diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 00dfefaf66a4..096bce622964 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -191,6 +191,7 @@ enum node_stat_item { NR_UNRECLAIMABLE_PAGES, NR_ION_HEAP, NR_ION_HEAP_POOL, + NR_GPU_HEAP, NR_VM_NODE_STAT_ITEMS }; diff --git a/mm/vmstat.c b/mm/vmstat.c index 2ef02636021a..eacde88e6544 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c @@ -1171,6 +1171,7 @@ const char * const vmstat_text[] = { "nr_ion_heap", "nr_ion_heap_pool", + "nr_gpu_heap", /* enum writeback_stat_item counters */ "nr_dirty_threshold", "nr_dirty_background_threshold", @@ -1704,6 +1705,9 @@ static void *vmstat_start(struct seq_file *m, loff_t *pos) static void *vmstat_next(struct seq_file *m, void *arg, loff_t *pos) { (*pos)++; + //nr_gpu_heap is out-of-tree now so we don't want to export it. + if (*pos == NR_VM_ZONE_STAT_ITEMS + NR_VM_NUMA_STAT_ITEMS + NR_GPU_HEAP) + (*pos)++; if (*pos >= ARRAY_SIZE(vmstat_text)) return NULL; return (unsigned long *)m->private + *pos;