From bf5a09f86709a5e2c01fcf5109b7bee6b5236c97 Mon Sep 17 00:00:00 2001 From: Christoph Lameter Date: Mon, 4 Feb 2008 22:29:22 -0800 Subject: [PATCH] --- yaml --- r: 83091 b: refs/heads/master c: 9eccf2a816ed0aad82b577de6a40cd098ad41944 h: refs/heads/master i: 83089: 2ccfe1138e452af7fbe20b1a396455ebba83e126 83087: ec633e349a91593c7de53b254059f84fc1ad29bc v: v3 --- [refs] | 2 +- trunk/mm/vmstat.c | 11 ++--------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/[refs] b/[refs] index d84a49a9c3d2..2d404ef5baab 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7766755a2f249e7e0dabc5255a0a3d151ff79821 +refs/heads/master: 9eccf2a816ed0aad82b577de6a40cd098ad41944 diff --git a/trunk/mm/vmstat.c b/trunk/mm/vmstat.c index 888668e0b7db..422d960ffcd8 100644 --- a/trunk/mm/vmstat.c +++ b/trunk/mm/vmstat.c @@ -21,21 +21,14 @@ EXPORT_PER_CPU_SYMBOL(vm_event_states); static void sum_vm_events(unsigned long *ret, cpumask_t *cpumask) { - int cpu = 0; + int cpu; int i; memset(ret, 0, NR_VM_EVENT_ITEMS * sizeof(unsigned long)); - cpu = first_cpu(*cpumask); - while (cpu < NR_CPUS) { + for_each_cpu_mask(cpu, *cpumask) { struct vm_event_state *this = &per_cpu(vm_event_states, cpu); - cpu = next_cpu(cpu, *cpumask); - - if (cpu < NR_CPUS) - prefetch(&per_cpu(vm_event_states, cpu)); - - for (i = 0; i < NR_VM_EVENT_ITEMS; i++) ret[i] += this->event[i]; }