Re: [PATCH] sched/fair: Dequeue sched_delayed tasks when waking to a busy CPU

From: Mike Galbraith
Date: Sun Nov 10 2024 - 22:54:27 EST


On Mon, 2024-11-11 at 10:46 +0800, Xuewen Yan wrote:
> >
> > +       if (p->se.sched_delayed) {
> > +               int queue_flags = ENQUEUE_DELAYED | ENQUEUE_NOCLOCK;
> > +
> > +               /*
> > +                * Since sched_delayed means we cannot be current anywhere,
> > +                * dequeue it here and have it fall through to the
> > +                * select_task_rq() case further along the ttwu() path.
> > +                */
> > +               if (rq->nr_running > 1 && p->nr_cpus_allowed > 1) {
>
> For sched_asym_cpucapacity system, need we consider the
> task_fits_cpu_capacity there?

I don't think so. Wakeup placement logic is what we're deflecting the
wakee toward, this is not the right spot to add any complexity.


-Mike