[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aS917UwBI20pBOQe@slm.duckdns.org>
Date: Tue, 2 Dec 2025 13:27:41 -1000
From: Tejun Heo <tj@...nel.org>
To: Peter Zijlstra <peterz@...radead.org>
Cc: mingo@...nel.org, vincent.guittot@...aro.org,
linux-kernel@...r.kernel.org, juri.lelli@...hat.com,
dietmar.eggemann@....com, rostedt@...dmis.org, bsegall@...gle.com,
mgorman@...e.de, vschneid@...hat.com, void@...ifault.com,
arighi@...dia.com, changwoo@...lia.com, sched-ext@...ts.linux.dev
Subject: Re: [PATCH 5/5] sched: Rework sched_class::wakeup_preempt() and
rq_modified_*()
Hello,
On Thu, Nov 27, 2025 at 04:39:48PM +0100, Peter Zijlstra wrote:
> @@ -2174,10 +2172,14 @@ void wakeup_preempt(struct rq *rq, struc
> {
> struct task_struct *donor = rq->donor;
>
> - if (p->sched_class == donor->sched_class)
> - donor->sched_class->wakeup_preempt(rq, p, flags);
> - else if (sched_class_above(p->sched_class, donor->sched_class))
> + if (p->sched_class == rq->next_class) {
> + rq->next_class->wakeup_preempt(rq, p, flags);
> +
> + } else if (sched_class_above(p->sched_class, rq->next_class)) {
> + rq->next_class->wakeup_preempt(rq, p, flags);
> resched_curr(rq);
> + rq->next_class = p->sched_class;
> + }
I wonder whether this is a bit subtle. Wouldn't it be clearer to add a
separate method which takes an explicit next_class argument for the second
case?
Thanks.
--
tejun
Powered by blists - more mailing lists