Skip to contentSkip to conversation

percpu: fix a mismatch between code and comment

PATCH Applied Namhyung Kim 2 participants 2 messages Aug 11, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 percpu: fix a mismatch between code and comment

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.

---

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(-)
mm/percpu.c +1 -1
index 9581f84..5e78131 100644
@@ -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;
Signature · 1 line
1.7.0.4
maintainer Applied
#1 lore raw
Quoted 6 lines · Namhyung Kim

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.

Applied to percpu#for-linus. Thanks.

Signature · 1 line
tejun