Re: [PATCH 4/4] sched/fair: Merge select_idle_core/cpu()

2021-01-27 Thread Vincent Guittot
On Wed, 27 Jan 2021 at 14:21, Mel Gorman 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) { > >

Re: [PATCH 4/4] sched/fair: Merge select_idle_core/cpu()

2021-01-27 Thread Mel Gorman
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 = se

Re: [PATCH 4/4] sched/fair: Merge select_idle_core/cpu()

2021-01-27 Thread Vincent Guittot
On Wed, 27 Jan 2021 at 13:02, Mel Gorman wrote: > > On Wed, Jan 27, 2021 at 11:43:22AM +0100, Vincent Guittot wrote: > > > @@ -6149,18 +6161,31 @@ static int select_idle_cpu(struct task_struct *p, > > > struct sched_domain *sd, int t > > > } > > > > > > for_each_cpu_wrap(cpu, cpus

Re: [PATCH 4/4] sched/fair: Merge select_idle_core/cpu()

2021-01-27 Thread Mel Gorman
On Wed, Jan 27, 2021 at 11:43:22AM +0100, Vincent Guittot wrote: > > @@ -6149,18 +6161,31 @@ static int select_idle_cpu(struct task_struct *p, > > struct sched_domain *sd, int t > > } > > > > for_each_cpu_wrap(cpu, cpus, target) { > > - if (!--nr) > > -

Re: [PATCH 4/4] sched/fair: Merge select_idle_core/cpu()

2021-01-27 Thread Vincent Guittot
On Mon, 25 Jan 2021 at 09:59, Mel Gorman wrote: > > From: Peter Zijlstra > > From: Peter Zijlstra (Intel) > > Both select_idle_core() and select_idle_cpu() do a loop over the same > cpumask. Observe that by clearing the already visited CPUs, we can > fold the iteration and iterate a core at a ti