diff options
author | Christoph Lameter <clameter@sgi.com> | 2008-02-05 01:29:22 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-05 12:44:18 -0500 |
commit | 9eccf2a816ed0aad82b577de6a40cd098ad41944 (patch) | |
tree | 28d971fbb701d545b54f9f5fdf71c12940d2b8df /mm/vmstat.c | |
parent | 7766755a2f249e7e0dabc5255a0a3d151ff79821 (diff) |
vmstat: remove prefetch
Remove the prefetch logic in order to avoid touching impossible per cpu
areas.
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Cc: Mike Travis <travis@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/vmstat.c')
-rw-r--r-- | mm/vmstat.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/mm/vmstat.c b/mm/vmstat.c index 888668e0b7db..422d960ffcd8 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c | |||
@@ -21,21 +21,14 @@ EXPORT_PER_CPU_SYMBOL(vm_event_states); | |||
21 | 21 | ||
22 | static void sum_vm_events(unsigned long *ret, cpumask_t *cpumask) | 22 | static void sum_vm_events(unsigned long *ret, cpumask_t *cpumask) |
23 | { | 23 | { |
24 | int cpu = 0; | 24 | int cpu; |
25 | int i; | 25 | int i; |
26 | 26 | ||
27 | memset(ret, 0, NR_VM_EVENT_ITEMS * sizeof(unsigned long)); | 27 | memset(ret, 0, NR_VM_EVENT_ITEMS * sizeof(unsigned long)); |
28 | 28 | ||
29 | cpu = first_cpu(*cpumask); | 29 | for_each_cpu_mask(cpu, *cpumask) { |
30 | while (cpu < NR_CPUS) { | ||
31 | struct vm_event_state *this = &per_cpu(vm_event_states, cpu); | 30 | struct vm_event_state *this = &per_cpu(vm_event_states, cpu); |
32 | 31 | ||
33 | cpu = next_cpu(cpu, *cpumask); | ||
34 | |||
35 | if (cpu < NR_CPUS) | ||
36 | prefetch(&per_cpu(vm_event_states, cpu)); | ||
37 | |||
38 | |||
39 | for (i = 0; i < NR_VM_EVENT_ITEMS; i++) | 32 | for (i = 0; i < NR_VM_EVENT_ITEMS; i++) |
40 | ret[i] += this->event[i]; | 33 | ret[i] += this->event[i]; |
41 | } | 34 | } |