* [PATCH] percpu: fix a mismatch between code and comment
@ 2010-08-11 2:19 Namhyung Kim
2010-08-11 8:02 ` Tejun Heo
0 siblings, 1 reply; 2+ messages in thread
From: Namhyung Kim @ 2010-08-11 2:19 UTC (permalink / raw)
To: Tejun Heo, linux-kernel
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] percpu: fix a mismatch between code and comment
2010-08-11 2:19 [PATCH] percpu: fix a mismatch between code and comment Namhyung Kim
@ 2010-08-11 8:02 ` Tejun Heo
0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2010-08-11 8:02 UTC (permalink / raw)
To: Namhyung Kim; +Cc: linux-kernel
On 08/11/2010 04:19 AM, Namhyung Kim wrote:
> 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>
Applied to percpu#for-linus. Thanks.
--
tejun
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-08-11 8:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-11 2:19 [PATCH] percpu: fix a mismatch between code and comment Namhyung Kim
2010-08-11 8:02 ` Tejun Heo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.