Commit 9eccf2a8 authored by Christoph Lameter's avatar Christoph Lameter Committed by Linus Torvalds

vmstat: remove prefetch

Remove the prefetch logic in order to avoid touching impossible per cpu
areas.
Signed-off-by: default avatarChristoph Lameter <clameter@sgi.com>
Cc: Mike Travis <travis@sgi.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 7766755a
...@@ -21,21 +21,14 @@ EXPORT_PER_CPU_SYMBOL(vm_event_states); ...@@ -21,21 +21,14 @@ EXPORT_PER_CPU_SYMBOL(vm_event_states);
static void sum_vm_events(unsigned long *ret, cpumask_t *cpumask) static void sum_vm_events(unsigned long *ret, cpumask_t *cpumask)
{ {
int cpu = 0; int cpu;
int i; int i;
memset(ret, 0, NR_VM_EVENT_ITEMS * sizeof(unsigned long)); memset(ret, 0, NR_VM_EVENT_ITEMS * sizeof(unsigned long));
cpu = first_cpu(*cpumask); for_each_cpu_mask(cpu, *cpumask) {
while (cpu < NR_CPUS) {
struct vm_event_state *this = &per_cpu(vm_event_states, cpu); 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++) for (i = 0; i < NR_VM_EVENT_ITEMS; i++)
ret[i] += this->event[i]; ret[i] += this->event[i];
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment