lkml.org 
[lkml]   [2021]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [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

\
 
 \ /
  Last update: 2021-01-27 14:31    [W:0.064 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site