Messages in this thread | | | From | Vincent Guittot <> | Date | Wed, 27 Jan 2021 14:26:41 +0100 | Subject | Re: [PATCH 4/4] sched/fair: Merge select_idle_core/cpu() |
| |
On Wed, 27 Jan 2021 at 14:21, Mel Gorman <mgorman@techsingularity.net> wrote: > > On Wed, Jan 27, 2021 at 02:07:50PM +0100, Vincent Guittot wrote: > > > @@ -6162,18 +6162,16 @@ static int select_idle_cpu(struct task_struct *p, struct sched_domain *sd, int t > > > > > > for_each_cpu_wrap(cpu, cpus, target) { > > > if (smt) { > > > - i = select_idle_core(p, cpu, cpus, &idle_cpu); > > > - if ((unsigned int)i < nr_cpumask_bits) > > > - return i; > > > + idle_cpu = select_idle_core(p, cpu, cpus, &idle_cpu); > > > > but how do you differentiate idle core (return value) and an idle cpu > > in the core set in &idle_cpu > > > > You will return as soon as a cpu is idle and before testing all cores > > > > Bah, I'm sorry, I was context switching between multiple tasks and failed > to engage brain. I'll apply your hunk and resend. I don't think this
That's also happen to me
> merits retesting as the saving of avoiding the intermeriate is marginal.
I agree. You can add my Reviewed-by
> > -- > Mel Gorman > SUSE Labs
| |