projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c67ad91
)
percpu_counters: use for_each_online_cpu()
author
Andrew Morton
<
[email protected]
>
Mon, 16 Jul 2007 06:39:51 +0000
(23:39 -0700)
committer
Linus Torvalds
<
[email protected]
>
Mon, 16 Jul 2007 16:05:41 +0000
(09:05 -0700)
Now that we have implemented hotunplug-time counter spilling,
percpu_counter_sum() only needs to look at online CPUs.
Cc: Gautham R Shenoy <
[email protected]
>
Cc: Oleg Nesterov <
[email protected]
>
Cc: Peter Zijlstra <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
lib/percpu_counter.c
patch
|
blob
|
history
diff --git
a/lib/percpu_counter.c
b/lib/percpu_counter.c
index 8901c4e9c2e6dd99b9492d8e7ad32a938340f628..cf22c617baa44db8708f9908efc64b9f767e0c92 100644
(file)
--- a/
lib/percpu_counter.c
+++ b/
lib/percpu_counter.c
@@
-45,7
+45,7
@@
s64 percpu_counter_sum(struct percpu_counter *fbc)
spin_lock(&fbc->lock);
ret = fbc->count;
- for_each_
possibl
e_cpu(cpu) {
+ for_each_
onlin
e_cpu(cpu) {
s32 *pcount = per_cpu_ptr(fbc->counters, cpu);
ret += *pcount;
}