public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nick Piggin <piggin@cyberone.com.au>
To: "Martin J. Bligh" <mbligh@aracnet.com>
Cc: Andrew Morton <akpm@osdl.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	nevdull@us.ibm.com, dvhart@us.ibm.com
Subject: Re: [PATCH] clarify find_busiest_group
Date: Fri, 23 Jan 2004 17:44:15 +1100	[thread overview]
Message-ID: <4010C2BF.7090806@cyberone.com.au> (raw)
In-Reply-To: <224300000.1074839500@[10.10.2.4]>



Martin J. Bligh wrote:

>Fix a minor nit with the find_busiest_group code. No functional change,
>but makes the code simpler and clearer. This patch does two things ... 
>adds some more expansive comments, and removes this if clause:
>
>      if (*imbalance < SCHED_LOAD_SCALE
>                      && max_load - this_load > SCHED_LOAD_SCALE)
>		*imbalance = SCHED_LOAD_SCALE;
>
>If we remove the scaling factor, we're basically conditionally doing:
>
>	if (*imbalance < 1)
>		*imbalance = 1;
>
>Which is pointless, as the very next thing we do is to remove the scaling
>factor, rounding up to the nearest integer as we do:
>
>	*imbalance = (*imbalance + SCHED_LOAD_SCALE - 1) >> SCHED_LOAD_SHIFT;
>
>Thus the if statement is redundant, and only makes the code harder to read ;-)
>

Thanks Martin,
You are right. The redundant code was left over from an older
version. Thanks for the comments too.

Andrew would you like me to take small changes like this and
feed them to you, or are you happy enough to pick them up?
No doubt there will be a a few more.



  reply	other threads:[~2004-01-23  6:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-23  6:31 [PATCH] clarify find_busiest_group Martin J. Bligh
2004-01-23  6:44 ` Nick Piggin [this message]
2004-01-23  7:02   ` Andrew Morton
2004-01-23 12:43   ` vts have stopped working here Ed Tomlinson
2004-01-23 13:05     ` Vojtech Pavlik
2004-01-23 15:05       ` Ed Tomlinson

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=4010C2BF.7090806@cyberone.com.au \
    --to=piggin@cyberone.com.au \
    --cc=akpm@osdl.org \
    --cc=dvhart@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mbligh@aracnet.com \
    --cc=nevdull@us.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