Skip to content

Commit

Permalink
vmstat: remove prefetch
Browse files Browse the repository at this point in the history
Remove the prefetch logic in order to avoid touching impossible per cpu
areas.

Signed-off-by: Christoph Lameter <[email protected]>
Cc: Mike Travis <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Christoph Lameter authored and Linus Torvalds committed Feb 5, 2008
1 parent 7766755 commit 9eccf2a
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions mm/vmstat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
Expand Down

0 comments on commit 9eccf2a

Please sign in to comment.