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]
Message-ID: <20090325161700.GA1411@elte.hu>
Date:	Wed, 25 Mar 2009 17:17:00 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Ray Lee <ray-lk@...rabbit.org>
Cc:	mingo@...hat.com, hpa@...or.com, ego@...ibm.com,
	linux-kernel@...r.kernel.org, a.p.zijlstra@...llo.nl,
	dhaval@...ux.vnet.ibm.com, balbir@...ibm.com,
	bharata@...ux.vnet.ibm.com, suresh.b.siddha@...el.com,
	tglx@...utronix.de, nickpiggin@...oo.com.au,
	svaidy@...ux.vnet.ibm.com, linux-tip-commits@...r.kernel.org
Subject: Re: [tip:sched/balancing] sched: Add comments to
	find_busiest_group() function


* Ray Lee <ray-lk@...rabbit.org> wrote:

> This commit says it's just adding comments, but...
> 
> On Wed, Mar 25, 2009 at 5:30 AM, Gautham R Shenoy <ego@...ibm.com> wrote:
> > Commit-ID:  b7bb4c9bb01941fe8feb653f3410e7ed0c9bb786
> > Gitweb:     http://git.kernel.org/tip/b7bb4c9bb01941fe8feb653f3410e7ed0c9bb786
> > Author:     Gautham R Shenoy <ego@...ibm.com>
> > AuthorDate: Wed, 25 Mar 2009 14:44:27 +0530
> > Committer:  Ingo Molnar <mingo@...e.hu>
> > CommitDate: Wed, 25 Mar 2009 13:28:30 +0100
> >
> > sched: Add comments to find_busiest_group() function
> >
> > Impact: cleanup
> >
> > Add /** style comments around find_busiest_group(). Also add a few
> > explanatory comments.
> 
> ...but there are actual code changes. Hard to know if you intended to
> do that and forgot to changelog it, or if it's an unexpected hunk that
> accidentally got included:
> 
> >        if (balance && !(*balance))
> >                goto ret;
> >
> > -       if (!sds.busiest || sds.this_load >= sds.max_load
> > -               || sds.busiest_nr_running == 0)
> > +       if (!sds.busiest || sds.busiest_nr_running == 0)
> > +               goto out_balanced;
> > +
> > +       if (sds.this_load >= sds.max_load)
> >                goto out_balanced;
> >
> >        sds.avg_load = (SCHED_LOAD_SCALE * sds.total_load) / sds.total_pwr;
> >
> > -       if (sds.this_load >= sds.avg_load ||
> > -                       100*sds.max_load <= sd->imbalance_pct * sds.this_load)
> > +       if (sds.this_load >= sds.avg_load)
> > +               goto out_balanced;
> > +
> > +       if (100 * sds.max_load <= sd->imbalance_pct * sds.this_load)
> >                goto out_balanced;
> >
> >        sds.busiest_load_per_task /= sds.busiest_nr_running;

yeah.

Note that it does not actually change the resulting logic, it splits 
out an over-long (and hard to read) series of conditions into an 
equivalent set of two if() statements. [the first one changes the 
order of two conditions - but that is harmless]

It indeed would have been nice to declare this in the changelog 
though.

	Ingo
--
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