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

2021-01-20 Thread Gautham R Shenoy
On Wed, Jan 20, 2021 at 09:54:20AM +, Mel Gorman wrote: > On Wed, Jan 20, 2021 at 10:21:47AM +0100, Vincent Guittot wrote: > > On Wed, 20 Jan 2021 at 10:12, Mel Gorman > > wrote: > > > > > > On Wed, Jan 20, 2021 at 02:00:18PM +0530, Gautham R Shenoy wrote: > > > > > @@ -6157,18 +6169,31 @@

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

2021-01-20 Thread Mel Gorman
On Wed, Jan 20, 2021 at 10:21:47AM +0100, Vincent Guittot wrote: > On Wed, 20 Jan 2021 at 10:12, Mel Gorman wrote: > > > > On Wed, Jan 20, 2021 at 02:00:18PM +0530, Gautham R Shenoy wrote: > > > > @@ -6157,18 +6169,31 @@ static int select_idle_cpu(struct task_struct > > > > *p, struct sched_domai

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

2021-01-20 Thread Vincent Guittot
On Wed, 20 Jan 2021 at 10:54, Mel Gorman wrote: > > On Wed, Jan 20, 2021 at 10:21:47AM +0100, Vincent Guittot wrote: > > On Wed, 20 Jan 2021 at 10:12, Mel Gorman > > wrote: > > > > > > On Wed, Jan 20, 2021 at 02:00:18PM +0530, Gautham R Shenoy wrote: > > > > > @@ -6157,18 +6169,31 @@ static int

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

2021-01-20 Thread Vincent Guittot
On Wed, 20 Jan 2021 at 10:12, Mel Gorman wrote: > > On Wed, Jan 20, 2021 at 02:00:18PM +0530, Gautham R Shenoy wrote: > > > @@ -6157,18 +6169,31 @@ static int select_idle_cpu(struct task_struct *p, > > > struct sched_domain *sd, int t > > > } > > > > > > for_each_cpu_wrap(cpu, cpus, targe

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

2021-01-20 Thread Mel Gorman
On Wed, Jan 20, 2021 at 02:00:18PM +0530, Gautham R Shenoy wrote: > > @@ -6157,18 +6169,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) > > - return

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

2021-01-20 Thread Gautham R Shenoy
Hello Mel, Peter, On Tue, Jan 19, 2021 at 11:22:11AM +, Mel Gorman wrote: > 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

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

2021-01-19 Thread Mel Gorman
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 time. All we need to do is remember any non-idle CPU we encountered while scanning for

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

2021-01-18 Thread Mel Gorman
On Mon, Jan 18, 2021 at 08:55:03PM +0800, Li, Aubrey wrote: > > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > > index 12e08da90024..6c0f841e9e75 100644 > > --- a/kernel/sched/fair.c > > +++ b/kernel/sched/fair.c > > @@ -6006,6 +6006,14 @@ static inline int find_idlest_cpu(struct > > sch

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

2021-01-18 Thread Li, Aubrey
On 2021/1/15 18:08, Mel Gorman wrote: > 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 time. > > All we need to do is remember

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

2021-01-15 Thread Mel Gorman
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 time. All we need to do is remember any non-idle CPU we encountered while scanning for

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

2021-01-14 Thread Mel Gorman
On Thu, Jan 14, 2021 at 04:44:46PM +0100, Vincent Guittot wrote: > > domain. There is no need to make it specific to the core account and we > > are already doing the full scan. Throttling that would be a separate patch. > > > > > This patch 5 should focus on merging select_idle_core and > > > sele

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

2021-01-14 Thread Vincent Guittot
On Thu, 14 Jan 2021 at 14:53, Mel Gorman wrote: > > On Thu, Jan 14, 2021 at 02:25:32PM +0100, Vincent Guittot wrote: > > On Thu, 14 Jan 2021 at 10:35, Mel Gorman > > wrote: > > > > > > On Wed, Jan 13, 2021 at 06:03:00PM +0100, Vincent Guittot wrote: > > > > > @@ -6159,16 +6171,29 @@ static int s

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

2021-01-14 Thread Mel Gorman
On Thu, Jan 14, 2021 at 02:25:32PM +0100, Vincent Guittot wrote: > On Thu, 14 Jan 2021 at 10:35, Mel Gorman wrote: > > > > On Wed, Jan 13, 2021 at 06:03:00PM +0100, Vincent Guittot wrote: > > > > @@ -6159,16 +6171,29 @@ static int select_idle_cpu(struct task_struct > > > > *p, struct sched_domain

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

2021-01-14 Thread Vincent Guittot
On Thu, 14 Jan 2021 at 10:35, Mel Gorman wrote: > > On Wed, Jan 13, 2021 at 06:03:00PM +0100, Vincent Guittot wrote: > > > @@ -6159,16 +6171,29 @@ static int select_idle_cpu(struct task_struct *p, > > > struct sched_domain *sd, int t > > > for_each_cpu_wrap(cpu, cpus, target) { > > >

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

2021-01-14 Thread Mel Gorman
On Wed, Jan 13, 2021 at 06:03:00PM +0100, Vincent Guittot wrote: > > @@ -6159,16 +6171,29 @@ static int select_idle_cpu(struct task_struct *p, > > struct sched_domain *sd, int t > > for_each_cpu_wrap(cpu, cpus, target) { > > if (!--nr) > > return -1;

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

2021-01-13 Thread Vincent Guittot
On Mon, 11 Jan 2021 at 16:50, Mel Gorman wrote: > > 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 time. > > All we need to do is remember any non-idle CPU we en

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

2021-01-11 Thread Mel Gorman
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 time. All we need to do is remember any non-idle CPU we encountered while scanning for an idle core. This way we'll on