From: Christoph Lameter Date: Tue, 5 Feb 2008 06:29:22 +0000 (-0800) Subject: vmstat: remove prefetch X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9eccf2a816ed0aad82b577de6a40cd098ad41944;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git vmstat: remove prefetch Remove the prefetch logic in order to avoid touching impossible per cpu areas. Signed-off-by: Christoph Lameter Cc: Mike Travis Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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); 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]; }