public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@gmail.com>
To: Tejun Heo <tj@kernel.org>, linux-kernel@vger.kernel.org
Subject: [PATCH] percpu: fix a mismatch between code and comment
Date: Wed, 11 Aug 2010 11:19:19 +0900	[thread overview]
Message-ID: <1281493159-2574-1-git-send-email-namhyung@gmail.com> (raw)

When pcpu_build_alloc_info() searches best_upa value, it ignores current value
if the number of waste units exceeds 1/3 of the number of total cpus. But the
comment on the code says that it will ignore if wastage is over 25%.
Modify the comment.

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
---

 I used -U5 rather than 3 for you to see the mismatch at a glance. :-)

 mm/percpu.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/mm/percpu.c b/mm/percpu.c
index 9581f84..5e78131 100644
--- a/mm/percpu.c
+++ b/mm/percpu.c
@@ -1174,11 +1174,11 @@ struct pcpu_alloc_info * __init pcpu_build_alloc_info(
 			allocs += this_allocs;
 			wasted += this_allocs * upa - group_cnt[group];
 		}
 
 		/*
-		 * Don't accept if wastage is over 25%.  The
+		 * Don't accept if wastage is over 1/3.  The
 		 * greater-than comparison ensures upa==1 always
 		 * passes the following check.
 		 */
 		if (wasted > num_possible_cpus() / 3)
 			continue;
-- 
1.7.0.4


             reply	other threads:[~2010-08-11  2:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-11  2:19 Namhyung Kim [this message]
2010-08-11  8:02 ` [PATCH] percpu: fix a mismatch between code and comment Tejun Heo

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=1281493159-2574-1-git-send-email-namhyung@gmail.com \
    --to=namhyung@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@kernel.org \
    /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