diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2007-07-16 08:39:51 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-16 18:05:41 +0200 |
commit | b4ef0296f214a1e0e65f161f88663b0ca1acca31 (patch) | |
tree | 57d0aa7e7201b6becf3bc69763e3efb090a297ce /lib/percpu_counter.c | |
parent | percpu_counters(): use cpu notifiers (diff) | |
download | linux-b4ef0296f214a1e0e65f161f88663b0ca1acca31.tar.xz linux-b4ef0296f214a1e0e65f161f88663b0ca1acca31.zip |
percpu_counters: use for_each_online_cpu()
Now that we have implemented hotunplug-time counter spilling,
percpu_counter_sum() only needs to look at online CPUs.
Cc: Gautham R Shenoy <ego@in.ibm.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib/percpu_counter.c')
-rw-r--r-- | lib/percpu_counter.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/percpu_counter.c b/lib/percpu_counter.c index 8901c4e9c2e6..cf22c617baa4 100644 --- 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_possible_cpu(cpu) { + for_each_online_cpu(cpu) { s32 *pcount = per_cpu_ptr(fbc->counters, cpu); ret += *pcount; } |