mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Gautham R Shenoy <ego@in.ibm.com>,
	Vaidyanathan Srinivasan <svaidy@linux.vnet.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 14:59:07 +0100	[thread overview]
Message-ID: <20090303135907.GA23822@elte.hu> (raw)
In-Reply-To: <1236083033.5330.4204.camel@laptop>


* 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.

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.

	Ingo

  reply	other threads:[~2009-03-03 13:59 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 [this message]
2009-03-03 15:45       ` Vaidyanathan Srinivasan
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=20090303135907.GA23822@elte.hu \
    --to=mingo@elte.hu \
    --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=suresh.b.siddha@intel.com \
    --cc=svaidy@linux.vnet.ibm.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®