Re: [PATCH V7 09/11] sched: Add nodelay scheduling
From: Thomas Gleixner
Date: Fri Aug 08 2025 - 09:26:26 EST
On Thu, Jul 24 2025 at 16:16, Prakash Sangappa wrote:
> --- a/kernel/sched/rt.c
> +++ b/kernel/sched/rt.c
You forgot dl.c :)
> @@ -1027,7 +1027,7 @@ static void update_curr_rt(struct rq *rq)
> rt_rq->rt_time += delta_exec;
> exceeded = sched_rt_runtime_exceeded(rt_rq);
> if (exceeded)
> - resched_curr(rq);
> + resched_curr_nodelay(rq, rq->curr);
How is this possibly correct?
If the current task has nodelay set, then this means it asks not to be
affected by a slice extension of a lower priority task.
But that aside, I agree with Sebastian, that this is overly complex and
yet another TIF RESCHED flag is just horrible. We should avoid it in the
first place unless there is a real use case.
RT uses the LAZY flag for non-RT tasks, which means if the regular
RESCHED is set on RT, then we just go and preempt and decline the
extension.
If there is a real use case somewhere down the road, we can revisit the
problem later. Keep it simple for now.
Thanks,
tglx