Re: [PATCH 2/2] sched/fair: Fix use of NULL with find_idlest_group

2017-08-22 Thread Brendan Jackman
On Tue, Aug 22 2017 at 11:03, Peter Zijlstra wrote: > On Tue, Aug 22, 2017 at 11:39:26AM +0100, Brendan Jackman wrote: > >> However the code movement helps - I'll combine it with Vincent's >> suggestions and post a v2. > > Please also split into multiple patches, as I feel this 2/2 does too >

Re: [PATCH 2/2] sched/fair: Fix use of NULL with find_idlest_group

2017-08-22 Thread Brendan Jackman
On Tue, Aug 22 2017 at 11:03, Peter Zijlstra wrote: > On Tue, Aug 22, 2017 at 11:39:26AM +0100, Brendan Jackman wrote: > >> However the code movement helps - I'll combine it with Vincent's >> suggestions and post a v2. > > Please also split into multiple patches, as I feel this 2/2 does too >

Re: [PATCH 2/2] sched/fair: Fix use of NULL with find_idlest_group

2017-08-22 Thread Peter Zijlstra
On Tue, Aug 22, 2017 at 11:39:26AM +0100, Brendan Jackman wrote: > However the code movement helps - I'll combine it with Vincent's > suggestions and post a v2. Please also split into multiple patches, as I feel this 2/2 does too many things. Fixing that this_*_load initialization stuff for

Re: [PATCH 2/2] sched/fair: Fix use of NULL with find_idlest_group

2017-08-22 Thread Peter Zijlstra
On Tue, Aug 22, 2017 at 11:39:26AM +0100, Brendan Jackman wrote: > However the code movement helps - I'll combine it with Vincent's > suggestions and post a v2. Please also split into multiple patches, as I feel this 2/2 does too many things. Fixing that this_*_load initialization stuff for

Re: [PATCH 2/2] sched/fair: Fix use of NULL with find_idlest_group

2017-08-22 Thread Brendan Jackman
On Tue, Aug 22 2017 at 10:39, Brendan Jackman wrote: > On Tue, Aug 22 2017 at 04:34, Joel Fernandes wrote: >> Hi Peter, >> >> On Mon, Aug 21, 2017 at 2:14 PM, Peter Zijlstra wrote: >>> On Mon, Aug 21, 2017 at 04:21:28PM +0100, Brendan Jackman wrote: The current use of

Re: [PATCH 2/2] sched/fair: Fix use of NULL with find_idlest_group

2017-08-22 Thread Brendan Jackman
On Tue, Aug 22 2017 at 10:39, Brendan Jackman wrote: > On Tue, Aug 22 2017 at 04:34, Joel Fernandes wrote: >> Hi Peter, >> >> On Mon, Aug 21, 2017 at 2:14 PM, Peter Zijlstra wrote: >>> On Mon, Aug 21, 2017 at 04:21:28PM +0100, Brendan Jackman wrote: The current use of returning NULL from

Re: [PATCH 2/2] sched/fair: Fix use of NULL with find_idlest_group

2017-08-22 Thread Brendan Jackman
On Tue, Aug 22 2017 at 07:48, Vincent Guittot wrote: > On 21 August 2017 at 17:21, Brendan Jackman wrote: >> The current use of returning NULL from find_idlest_group is broken in > [snip] >> --- >> kernel/sched/fair.c | 34 +++--- >> 1 file

Re: [PATCH 2/2] sched/fair: Fix use of NULL with find_idlest_group

2017-08-22 Thread Brendan Jackman
On Tue, Aug 22 2017 at 07:48, Vincent Guittot wrote: > On 21 August 2017 at 17:21, Brendan Jackman wrote: >> The current use of returning NULL from find_idlest_group is broken in > [snip] >> --- >> kernel/sched/fair.c | 34 +++--- >> 1 file changed, 19 insertions(+),

Re: [PATCH 2/2] sched/fair: Fix use of NULL with find_idlest_group

2017-08-22 Thread Brendan Jackman
On Tue, Aug 22 2017 at 04:34, Joel Fernandes wrote: > Hi Peter, > > On Mon, Aug 21, 2017 at 2:14 PM, Peter Zijlstra wrote: >> On Mon, Aug 21, 2017 at 04:21:28PM +0100, Brendan Jackman wrote: >>> The current use of returning NULL from find_idlest_group is broken in >>> two

Re: [PATCH 2/2] sched/fair: Fix use of NULL with find_idlest_group

2017-08-22 Thread Brendan Jackman
On Tue, Aug 22 2017 at 04:34, Joel Fernandes wrote: > Hi Peter, > > On Mon, Aug 21, 2017 at 2:14 PM, Peter Zijlstra wrote: >> On Mon, Aug 21, 2017 at 04:21:28PM +0100, Brendan Jackman wrote: >>> The current use of returning NULL from find_idlest_group is broken in >>> two cases: >>> >>> a1) The

Re: [PATCH 2/2] sched/fair: Fix use of NULL with find_idlest_group

2017-08-22 Thread Vincent Guittot
On 21 August 2017 at 17:21, Brendan Jackman wrote: > The current use of returning NULL from find_idlest_group is broken in [snip] > --- > kernel/sched/fair.c | 34 +++--- > 1 file changed, 19 insertions(+), 15 deletions(-) > > diff --git

Re: [PATCH 2/2] sched/fair: Fix use of NULL with find_idlest_group

2017-08-22 Thread Vincent Guittot
On 21 August 2017 at 17:21, Brendan Jackman wrote: > The current use of returning NULL from find_idlest_group is broken in [snip] > --- > kernel/sched/fair.c | 34 +++--- > 1 file changed, 19 insertions(+), 15 deletions(-) > > diff --git a/kernel/sched/fair.c

Re: [PATCH 2/2] sched/fair: Fix use of NULL with find_idlest_group

2017-08-21 Thread Joel Fernandes
Hi Peter, On Mon, Aug 21, 2017 at 2:14 PM, Peter Zijlstra wrote: > On Mon, Aug 21, 2017 at 04:21:28PM +0100, Brendan Jackman wrote: >> The current use of returning NULL from find_idlest_group is broken in >> two cases: >> >> a1) The local group is not allowed. >> >>In

Re: [PATCH 2/2] sched/fair: Fix use of NULL with find_idlest_group

2017-08-21 Thread Joel Fernandes
Hi Peter, On Mon, Aug 21, 2017 at 2:14 PM, Peter Zijlstra wrote: > On Mon, Aug 21, 2017 at 04:21:28PM +0100, Brendan Jackman wrote: >> The current use of returning NULL from find_idlest_group is broken in >> two cases: >> >> a1) The local group is not allowed. >> >>In this case, we currently

Re: [PATCH 2/2] sched/fair: Fix use of NULL with find_idlest_group

2017-08-21 Thread Peter Zijlstra
On Mon, Aug 21, 2017 at 11:14:00PM +0200, Peter Zijlstra wrote: > +static int > +find_idlest_cpu(struct sched_domain *sd, struct task_struct *p, int cpu, int > sd_flag) > +{ > + struct sched_domain *tmp; > + int new_cpu = cpu; > + > + while (sd) { > + struct sched_group

Re: [PATCH 2/2] sched/fair: Fix use of NULL with find_idlest_group

2017-08-21 Thread Peter Zijlstra
On Mon, Aug 21, 2017 at 11:14:00PM +0200, Peter Zijlstra wrote: > +static int > +find_idlest_cpu(struct sched_domain *sd, struct task_struct *p, int cpu, int > sd_flag) > +{ > + struct sched_domain *tmp; > + int new_cpu = cpu; > + > + while (sd) { > + struct sched_group

Re: [PATCH 2/2] sched/fair: Fix use of NULL with find_idlest_group

2017-08-21 Thread Peter Zijlstra
On Mon, Aug 21, 2017 at 04:21:28PM +0100, Brendan Jackman wrote: > The current use of returning NULL from find_idlest_group is broken in > two cases: > > a1) The local group is not allowed. > >In this case, we currently do not change this_runnable_load or >this_avg_load from its initial

Re: [PATCH 2/2] sched/fair: Fix use of NULL with find_idlest_group

2017-08-21 Thread Peter Zijlstra
On Mon, Aug 21, 2017 at 04:21:28PM +0100, Brendan Jackman wrote: > The current use of returning NULL from find_idlest_group is broken in > two cases: > > a1) The local group is not allowed. > >In this case, we currently do not change this_runnable_load or >this_avg_load from its initial

Re: [PATCH 2/2] sched/fair: Fix use of NULL with find_idlest_group

2017-08-21 Thread Peter Zijlstra
On Mon, Aug 21, 2017 at 06:59:28PM +0100, Brendan Jackman wrote: > Hi Josef, > > Thanks for taking a look. > > On Mon, Aug 21 2017 at 17:26, Josef Bacik wrote: > > On Mon, Aug 21, 2017 at 04:21:28PM +0100, Brendan Jackman wrote: > [...] > >> - local_group = cpumask_test_cpu(this_cpu, >

Re: [PATCH 2/2] sched/fair: Fix use of NULL with find_idlest_group

2017-08-21 Thread Peter Zijlstra
On Mon, Aug 21, 2017 at 06:59:28PM +0100, Brendan Jackman wrote: > Hi Josef, > > Thanks for taking a look. > > On Mon, Aug 21 2017 at 17:26, Josef Bacik wrote: > > On Mon, Aug 21, 2017 at 04:21:28PM +0100, Brendan Jackman wrote: > [...] > >> - local_group = cpumask_test_cpu(this_cpu, >

Re: [PATCH 2/2] sched/fair: Fix use of NULL with find_idlest_group

2017-08-21 Thread Brendan Jackman
Hi Josef, Thanks for taking a look. On Mon, Aug 21 2017 at 17:26, Josef Bacik wrote: > On Mon, Aug 21, 2017 at 04:21:28PM +0100, Brendan Jackman wrote: [...] >> -local_group = cpumask_test_cpu(this_cpu, >> - sched_group_span(group)); >> - > >

Re: [PATCH 2/2] sched/fair: Fix use of NULL with find_idlest_group

2017-08-21 Thread Brendan Jackman
Hi Josef, Thanks for taking a look. On Mon, Aug 21 2017 at 17:26, Josef Bacik wrote: > On Mon, Aug 21, 2017 at 04:21:28PM +0100, Brendan Jackman wrote: [...] >> -local_group = cpumask_test_cpu(this_cpu, >> - sched_group_span(group)); >> - > >

Re: [PATCH 2/2] sched/fair: Fix use of NULL with find_idlest_group

2017-08-21 Thread Josef Bacik
On Mon, Aug 21, 2017 at 04:21:28PM +0100, Brendan Jackman wrote: > The current use of returning NULL from find_idlest_group is broken in > two cases: > > a1) The local group is not allowed. > >In this case, we currently do not change this_runnable_load or >this_avg_load from its initial

Re: [PATCH 2/2] sched/fair: Fix use of NULL with find_idlest_group

2017-08-21 Thread Josef Bacik
On Mon, Aug 21, 2017 at 04:21:28PM +0100, Brendan Jackman wrote: > The current use of returning NULL from find_idlest_group is broken in > two cases: > > a1) The local group is not allowed. > >In this case, we currently do not change this_runnable_load or >this_avg_load from its initial