X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=mm%2Fvmstat.c;h=c7370579111b872943c56bd694dc0bd02121092d;hb=7795912c257bc068445f1db429c94d6b4b6ee604;hp=b3e3b9d525d08b71527365ae63a59a49695e5757;hpb=b463036ad7c6e9a74275f4f901acb3dbb74ec1ad;p=~andy%2Flinux diff --git a/mm/vmstat.c b/mm/vmstat.c index b3e3b9d525d..c7370579111 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c @@ -495,6 +495,18 @@ void refresh_cpu_vm_stats(int cpu) atomic_long_add(global_diff[i], &vm_stat[i]); } +void drain_zonestat(struct zone *zone, struct per_cpu_pageset *pset) +{ + int i; + + for (i = 0; i < NR_VM_ZONE_STAT_ITEMS; i++) + if (pset->vm_stat_diff[i]) { + int v = pset->vm_stat_diff[i]; + pset->vm_stat_diff[i] = 0; + atomic_long_add(v, &zone->vm_stat[i]); + atomic_long_add(v, &vm_stat[i]); + } +} #endif #ifdef CONFIG_NUMA @@ -722,6 +734,7 @@ const char * const vmstat_text[] = { "numa_other", #endif "nr_anon_transparent_hugepages", + "nr_free_cma", "nr_dirty_threshold", "nr_dirty_background_threshold", @@ -781,7 +794,6 @@ const char * const vmstat_text[] = { "unevictable_pgs_munlocked", "unevictable_pgs_cleared", "unevictable_pgs_stranded", - "unevictable_pgs_mlockfreed", #ifdef CONFIG_TRANSPARENT_HUGEPAGE "thp_fault_alloc",