From: Preeti U Murthy <preeti@linux.vnet.ibm.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>,
Preeti Murthy <preeti.lkml@gmail.com>,
mingo@kernel.org, hpa@zytor.com, linux-kernel@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>,
mikey@neuling.org, linux-tip-commits@vger.kernel.org
Subject: Re: [PATCH v2] sched: Check sched_domain before computing group power.
Date: Thu, 14 Nov 2013 14:42:45 +0530 [thread overview]
Message-ID: <5284940D.6050402@linux.vnet.ibm.com> (raw)
In-Reply-To: <20131114083037.GT21461@twins.programming.kicks-ass.net>
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() of the groups of the sched domains that would probably
>> degenerate in cpu_attach_domain()? So it seemed best to move update_group_power()
>> to after cpu_attach_domain() so that it saves unnecessary iterations over
>> sched domains which could degenerate, and it fixes the issue that you have brought out
>> as well. See below for the patch:
>
> So how is publishing the domain tree before we've set these values at
> all going to help avoid the divide-by-zero problem?
We are still doing initialization of cpu power and power_orig during
building of sched domains right? Except that it is being done after CPUs
have base domains attached to them.
But if you are talking about the check in sched_debug_one() on if
power_orig has been initialized, then yes, this patch fails. I am sorry
I overlooked the sched_debug() checks in cpu_attach_domain().
>
> Also its just terribly bad form to publish something before you're done
> with initialization.
You are right. cpu_rq(cpu)->sd is going to be used by anyone intending
to iterate through the sched domains. By the time we publish this, every
parameter related to sched domains and groups need to be initialized.
The fact that sched_domain_debug() is going to be called by
cpu_attach_domain() to do one final sanity check on all the parameters
of the sched domains further emphasizes that we cannot have anything
un-initialised at this stage. So clearly my patch is incorrect.
Please add my Reviewed-by to Srikar's patch.
Thanks.
Regards
Preeti U. Murthy
>
next prev parent reply other threads:[~2013-11-14 9:16 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-12 18:05 [tip:sched/core] sched/fair: Fix group power_orig computation tip-bot for Peter Zijlstra
2013-09-12 23:21 ` Michael Neuling
2013-11-12 10:55 ` Srikar Dronamraju
2013-11-12 11:57 ` Peter Zijlstra
2013-11-12 16:41 ` [PATCH v2] sched: Check sched_domain before computing group power Srikar Dronamraju
2013-11-12 17:03 ` Peter Zijlstra
2013-11-12 17:15 ` Srikar Dronamraju
2013-11-12 17:55 ` Peter Zijlstra
2013-11-13 5:55 ` Srikar Dronamraju
[not found] ` <CAM4v1pNMn=5oZDiX3fUp9uPkZTPJgk=vEKEjevzvpwn=PjTzXg@mail.gmail.com>
2013-11-13 11:23 ` Srikar Dronamraju
2013-11-14 6:06 ` Preeti U Murthy
2013-11-14 8:30 ` Peter Zijlstra
2013-11-14 9:12 ` Preeti U Murthy [this message]
2013-11-13 15:17 ` Peter Zijlstra
2013-11-14 10:50 ` Srikar Dronamraju
2013-11-14 11:15 ` Peter Zijlstra
2013-11-19 19:15 ` [tip:sched/urgent] " tip-bot for Srikar Dronamraju
2013-11-19 23:36 ` Yinghai Lu
2013-11-21 15:03 ` Peter Zijlstra
2013-11-21 17:22 ` Yinghai Lu
2013-11-21 22:03 ` Yinghai Lu
2013-11-28 3:02 ` David Rientjes
2013-11-28 7:07 ` Yinghai Lu
2013-11-28 9:38 ` Peter Zijlstra
2013-11-28 20:23 ` Yinghai Lu
2013-12-06 6:24 ` Yinghai Lu
2013-12-10 10:58 ` Peter Zijlstra
2013-12-10 21:26 ` Yinghai Lu
2013-11-22 12:07 ` Peter Zijlstra
2013-11-23 5:00 ` Yinghai Lu
2013-11-23 18:53 ` Peter Zijlstra
2013-11-28 2:57 ` David Rientjes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5284940D.6050402@linux.vnet.ibm.com \
--to=preeti@linux.vnet.ibm.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mikey@neuling.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=preeti.lkml@gmail.com \
--cc=srikar@linux.vnet.ibm.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).