lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 3 Mar 2009 21:15:37 +0530
From:	Vaidyanathan Srinivasan <svaidy@...ux.vnet.ibm.com>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Gautham R Shenoy <ego@...ibm.com>,
	Balbir Singh <balbir@...ibm.com>,
	Suresh Siddha <suresh.b.siddha@...el.com>,
	Dipankar Sarma <dipankar@...ibm.com>, efault@....de,
	andi@...stfloor.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2 2/3] sched: Fix the wakeup nomination for
	sched_mc/smt_power_savings.

* Ingo Molnar <mingo@...e.hu> [2009-03-03 14:59:07]:

> 
> * Peter Zijlstra <a.p.zijlstra@...llo.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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ