Re: [PATCH v2] sched: Check sched_domain before computing group power.

2013-11-14 Thread Peter Zijlstra
On Thu, Nov 14, 2013 at 04:20:17PM +0530, Srikar Dronamraju wrote: > > + /* > > +* build_sched_domains() -> init_sched_groups_power() > > +* gets here before we've attached the domains to the > > +* runqueues. > > +

Re: [PATCH v2] sched: Check sched_domain before computing group power.

2013-11-14 Thread Srikar Dronamraju
> + /* > + * build_sched_domains() -> init_sched_groups_power() > + * gets here before we've attached the domains to the > + * runqueues. > + * > + * Use power_of(), which is

Re: [PATCH v2] sched: Check sched_domain before computing group power.

2013-11-14 Thread Preeti U Murthy
Hi Peter, On 11/14/2013 02:00 PM, Peter Zijlstra wrote: > On Thu, Nov 14, 2013 at 11:36:27AM +0530, Preeti U Murthy wrote: >> However I was thinking that a better fix would be to reorder the way we call >> update_group_power() and cpu_attach_domain(). Why do we need to do >> update_group_power() o

Re: [PATCH v2] sched: Check sched_domain before computing group power.

2013-11-14 Thread Peter Zijlstra
On Thu, Nov 14, 2013 at 11:36:27AM +0530, Preeti U Murthy wrote: > However I was thinking that a better fix would be to reorder the way we call > update_group_power() and cpu_attach_domain(). Why do we need to do > update_group_power() of the groups of the sched domains that would probably > degene

Re: [PATCH v2] sched: Check sched_domain before computing group power.

2013-11-13 Thread Preeti U Murthy
Hi, On 11/13/2013 04:53 PM, Srikar Dronamraju wrote: > * Preeti Murthy [2013-11-13 16:22:37]: > >> Hi Srikar, >> >> update_group_power() is called only during load balancing during >> update_sg_lb_stats(). >> Load balancing begins at the base domain of the CPU,rq(cpu)->sd. This is >> checked for

Re: [PATCH v2] sched: Check sched_domain before computing group power.

2013-11-13 Thread Peter Zijlstra
On Tue, Nov 12, 2013 at 10:11:26PM +0530, Srikar Dronamraju wrote: > After Commit-id 863bffc80898 (sched/fair: Fix group power_orig > computation), we might end up computing group power before the > sched_domain for a cpu is updated. > > Update with cpu_power, if rq->sd is not yet updated. > > Si

Re: [PATCH v2] sched: Check sched_domain before computing group power.

2013-11-13 Thread Srikar Dronamraju
* Preeti Murthy [2013-11-13 16:22:37]: > Hi Srikar, > > update_group_power() is called only during load balancing during > update_sg_lb_stats(). > Load balancing begins at the base domain of the CPU,rq(cpu)->sd. This is > checked for > NULL. So how can update_group_power() be called in a scenari

Re: [PATCH v2] sched: Check sched_domain before computing group power.

2013-11-12 Thread Srikar Dronamraju
* Peter Zijlstra [2013-11-12 18:55:54]: > On Tue, Nov 12, 2013 at 10:45:07PM +0530, Srikar Dronamraju wrote: > > > > > > Hurm.. can you provide the actual topology of the machine that triggers > > > this? My brain hurts trying to thing through the weird cases of this > > > code. > > > > > > >

Re: [PATCH v2] sched: Check sched_domain before computing group power.

2013-11-12 Thread Peter Zijlstra
On Tue, Nov 12, 2013 at 10:45:07PM +0530, Srikar Dronamraju wrote: > > > > Hurm.. can you provide the actual topology of the machine that triggers > > this? My brain hurts trying to thing through the weird cases of this > > code. > > > > Hope this helps. Please do let me know if you were looking

Re: [PATCH v2] sched: Check sched_domain before computing group power.

2013-11-12 Thread Srikar Dronamraju
> > Hurm.. can you provide the actual topology of the machine that triggers > this? My brain hurts trying to thing through the weird cases of this > code. > Hope this helps. Please do let me know if you were looking for pdf output. Machine (251GB) NUMANode P#0 (63GB) Socket P#0

Re: [PATCH v2] sched: Check sched_domain before computing group power.

2013-11-12 Thread Peter Zijlstra
On Tue, Nov 12, 2013 at 10:11:26PM +0530, Srikar Dronamraju wrote: > After Commit-id 863bffc80898 (sched/fair: Fix group power_orig > computation), we might end up computing group power before the > sched_domain for a cpu is updated. > > Update with cpu_power, if rq->sd is not yet updated. > > Si

[PATCH v2] sched: Check sched_domain before computing group power.

2013-11-12 Thread Srikar Dronamraju
After Commit-id 863bffc80898 (sched/fair: Fix group power_orig computation), we might end up computing group power before the sched_domain for a cpu is updated. Update with cpu_power, if rq->sd is not yet updated. Signed-off-by: Srikar Dronamraju --- Changelog since v1: Fix divide by zero errors