summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorNick Piggin <nickpiggin@yahoo.com.au>2006-01-06 00:11:00 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-06 08:33:25 -0800
commita86b1f53166a260ced8f3c8c526945bf496f2e78 (patch)
tree5513bccce91fed08d4769fd18e0f527a84aea508 /mm
parent2d92c5c9150a2a9ca3dc25da58d5042e17a96b6a (diff)
downloadblackbird-op-linux-a86b1f53166a260ced8f3c8c526945bf496f2e78.tar.gz
blackbird-op-linux-a86b1f53166a260ced8f3c8c526945bf496f2e78.zip
[PATCH] mm: page_state fixes
read_page_state and __get_page_state only traverse online CPUs, which will cause results to fluctuate when CPUs are plugged in or out. Signed-off-by: Nick Piggin <npiggin@suse.de> Cc: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/page_alloc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 7cff958e7813..379618747deb 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -1169,12 +1169,11 @@ EXPORT_SYMBOL(nr_pagecache);
DEFINE_PER_CPU(long, nr_pagecache_local) = 0;
#endif
-void __get_page_state(struct page_state *ret, int nr, cpumask_t *cpumask)
+static void __get_page_state(struct page_state *ret, int nr, cpumask_t *cpumask)
{
int cpu = 0;
memset(ret, 0, sizeof(*ret));
- cpus_and(*cpumask, *cpumask, cpu_online_map);
cpu = first_cpu(*cpumask);
while (cpu < NR_CPUS) {
@@ -1227,7 +1226,7 @@ unsigned long __read_page_state(unsigned long offset)
unsigned long ret = 0;
int cpu;
- for_each_online_cpu(cpu) {
+ for_each_cpu(cpu) {
unsigned long in;
in = (unsigned long)&per_cpu(page_states, cpu) + offset;
OpenPOWER on IntegriCloud