Re: [PATCH 8/8] sched/eevdf: Add min slice check when selecting CPU

From: Vincent Guittot

Date: Tue Sep 29 2026 - 08:44:51 EST


On Sun, 27 Sept 2026 at 09:45, Kayra Cizmeci <kayracizmeci@xxxxxxxxx> wrote:
>
> Hi Vincent,
>
> > > > Add a new level for selecting CPU when select_task_rq_fair() fails to find
> > > > an idle CPU. This last level will compare the slice to select a CPU where
> > > > the task could run 1st.
> > > > This helps a waking task to select a CPU where a longer slice runs
> > > > instead of one where a task with the same or shorter slice already runs.
>
> > > > + if (sched_feat(SIS_UTIL) && sd->shared) {
> > > > + /*
> > > > + * Same nr_idle_scan hint as select_idle_cpu(), nr only limits
> > > > + * the scan when not preferring an idle core.
> > > > + */
> > > > + nr = READ_ONCE(sd->shared->nr_idle_scan) + 1;
> > > > + /* overloaded domain is unlikely to have idle cpu/core */
> > > > + if (nr == 1)
> > > > + return -1;
> > > > + }
>
> Ain't nr_idle_scan shows load of the system? Even the comment at top talks about
> idle CPU's, but we're not looking for a idle CPU right now.

The comment needs updating because we are no longer looking for an
idle CPU, but we are keeping the same limitation for the number of
loops.
By the way, I'm going to merge this with searching idle CPU

>
> I may be getting something wrong, so please correct me so.
>
>
> Thanks,
> Kayra
>