--- include/linux/vmstat.h | 2 +- mm/allocpercpu.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) Index: linux-2.6/include/linux/vmstat.h =================================================================== --- linux-2.6.orig/include/linux/vmstat.h 2007-10-30 21:11:04.000000000 -0700 +++ linux-2.6/include/linux/vmstat.h 2007-10-30 21:12:05.000000000 -0700 @@ -36,7 +36,7 @@ enum vm_event_item { PGPGIN, PGPGOUT, PS FOR_ALL_ZONES(PGSCAN_KSWAPD), FOR_ALL_ZONES(PGSCAN_DIRECT), PGINODESTEAL, SLABS_SCANNED, KSWAPD_STEAL, KSWAPD_INODESTEAL, - PAGEOUTRUN, ALLOCSTALL, PGROTATED, + PAGEOUTRUN, ALLOCSTALL, PGROTATED, ALLOC_PERCPU, NR_VM_EVENT_ITEMS }; Index: linux-2.6/mm/allocpercpu.c =================================================================== --- linux-2.6.orig/mm/allocpercpu.c 2007-10-30 21:12:31.000000000 -0700 +++ linux-2.6/mm/allocpercpu.c 2007-10-30 21:13:26.000000000 -0700 @@ -64,6 +64,7 @@ static inline void *cpu_alloc(unsigned l } while (1); set_map(start, units); + count_vm_events(ALLOC_PERCPU, units * sizeof(per_cpu_unit)); spin_unlock(&cpu_area_lock); return (void *)(start * sizeof(per_cpu_unit) + CPU_DATA_OFFSET); } @@ -81,6 +82,7 @@ static inline void cpu_free(void *pcpu) spin_lock(&cpu_area_lock); clear_map(start, units); + count_vm_events(ALLOC_PERCPU, -units * sizeof(per_cpu_unit)); spin_unlock(&cpu_area_lock); }