From: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
Gautham R Shenoy <ego@in.ibm.com>,
Balbir Singh <balbir@in.ibm.com>,
Suresh Siddha <suresh.b.siddha@intel.com>,
Dipankar Sarma <dipankar@in.ibm.com>,
efault@gmx.de, andi@firstfloor.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2 2/3] sched: Fix the wakeup nomination for sched_mc/smt_power_savings.
Date: Tue, 3 Mar 2009 21:15:37 +0530 [thread overview]
Message-ID: <20090303154537.GI4708@dirshya.in.ibm.com> (raw)
In-Reply-To: <20090303135907.GA23822@elte.hu>
* Ingo Molnar <mingo@elte.hu> [2009-03-03 14:59:07]:
>
> * Peter Zijlstra <a.p.zijlstra@chello.nl> wrote:
>
> > On Tue, 2009-03-03 at 17:21 +0530, Gautham R Shenoy wrote:
> > > +/* Assign the sched-domain level which can nominate preferred wake-up cpu */
> > > + rd->sched_mc_preferred_wakeup_cpu = UINT_MAX;
> > > + rd->authorized_nomination_level = SD_LV_NONE;
> > > +
> > > + if (active_power_savings_level >= POWERSAVINGS_BALANCE_WAKEUP) {
> > > + struct sched_domain *sd;
> > > + enum sched_domain_level authorized_nomination_level =
> > > + SD_LV_NONE;
> > > +
> > > + for_each_domain(first_cpu(*cpu_map), sd) {
> > > + if (!(sd->flags & SD_POWERSAVINGS_BALANCE))
> > > + continue;
> > > + authorized_nomination_level = sd->level;
> > > + }
> > > +
> > > + rd->authorized_nomination_level = authorized_nomination_level;
> > > + }
> >
> > Very odd looking comments there, and that enum init wrapping looks
> > weird. Either exceed 80 chars, or write it in a second line like:
> >
> > enum sched_domain_level authorized_nomination_level;
> >
> > authorized_nomination_level = SD_LV_NONE;
>
> I think find_busiest_group() needs to be split up into several
> helper functions first, before we add more to it. I.e. first a
> couple of cleanup patches that factor it out into 3-4 helper
> functions plus a really easy-to-read find_busiest_group() main
> function.
Hi Ingo,
I had earlier posted cleanup for find_busiest_group(), but Peter
mentioned that he is changing the cpu_power infrastructure and I can
rework the cleanup after that.
[RFC PATCH v1 0/5] Modular find_busiest_group()
V1: http://lkml.org/lkml/2008/9/24/201
V2: http://lkml.org/lkml/2008/10/9/176
Peter did post an RFD for his new proposal:
http://lkml.org/lkml/2008/10/14/148
I think we can revive the discussion thread and start cleaning up.
> Then can we do the above change - and i bet we'll win at least
> one indentation level as well so that weird line break goes
> away.
The above code is in __build_sched_domains() and I think we can
shorten the variable names and make the code look better. Indentation
level here is not as bad as in find_busiest_group().
Thanks,
Vaidy
next prev parent reply other threads:[~2009-03-03 15:44 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-03 11:51 [PATCH v2 0/3] sched: Extend sched_mc/smt_power_savings framework Gautham R Shenoy
2009-03-03 11:51 ` [PATCH 2 1/3] sched: code cleanup - sd_power_saving_flags(), sd_balance_for_mc/package_power() Gautham R Shenoy
2009-03-03 11:51 ` [PATCH 2 2/3] sched: Fix the wakeup nomination for sched_mc/smt_power_savings Gautham R Shenoy
2009-03-03 12:23 ` Peter Zijlstra
2009-03-03 13:59 ` Ingo Molnar
2009-03-03 15:45 ` Vaidyanathan Srinivasan [this message]
2009-03-03 15:48 ` Peter Zijlstra
2009-03-03 16:26 ` Ingo Molnar
2009-03-03 11:51 ` [PATCH 2 3/3] sched: Fix sd_parent_degenerate for SD_POWERSAVINGS_BALANCE Gautham R Shenoy
2009-03-03 12:21 ` [PATCH v2 0/3] sched: Extend sched_mc/smt_power_savings framework Peter Zijlstra
2009-03-03 15:25 ` Vaidyanathan Srinivasan
2009-03-03 15:28 ` Peter Zijlstra
2009-03-04 11:06 ` Vaidyanathan Srinivasan
2009-03-04 11:38 ` Gautham R Shenoy
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=20090303154537.GI4708@dirshya.in.ibm.com \
--to=svaidy@linux.vnet.ibm.com \
--cc=a.p.zijlstra@chello.nl \
--cc=andi@firstfloor.org \
--cc=balbir@in.ibm.com \
--cc=dipankar@in.ibm.com \
--cc=efault@gmx.de \
--cc=ego@in.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=suresh.b.siddha@intel.com \
/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
all inboxes | Powered by JetHome®