lkml.org 
[lkml]   [2021]   [Aug]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH 7/9] sched/fair: Enforce proportional scan limits when scanning for an idle core
On Mon, Aug 02, 2021 at 10:52:01AM +0000, Song Bao Hua (Barry Song) wrote:
> > @@ -6265,30 +6265,35 @@ static int select_idle_cpu(struct task_struct *p, struct
> > sched_domain *sd, bool
> > if (has_idle_core) {
> > i = select_idle_core(p, cpu, cpus, &idle_cpu);
> > if ((unsigned int)i < nr_cpumask_bits)
> > - return i;
> > + break;
> >
> > + nr -= sched_smt_weight;
> > } else {
> > - if (!--nr)
> > - return -1;
> > idle_cpu = __select_idle_cpu(cpu, p);
> > if ((unsigned int)idle_cpu < nr_cpumask_bits)
> > break;
> > + nr--;
> > }
> > +
> > + if (nr < 0)
> > + break;
> > }
> >
> > - if (has_idle_core)
> > - set_idle_cores(target, false);
> > + if ((unsigned int)idle_cpu < nr_cpumask_bits) {
> > + if (has_idle_core)
> > + set_idle_cores(target, false);
> >
>
> For example, if we have 16 cpus(8 SMT2 cores). In case core7 is idle,
> we only have scanned core0+core1(cpu0-cpu3) and if these two cores
> are not idle, but here we set has_idle_cores to false while core7 is
> idle. It seems incorrect.
>

Yep, that block needs to be revisited.

--
Mel Gorman
SUSE Labs

\
 
 \ /
  Last update: 2021-08-04 12:23    [W:0.078 / U:0.456 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site