diff --git a/drivers/base/node.c b/drivers/base/node.c index 90aa2a11a933..8746e55d62a5 100644 --- a/drivers/base/node.c +++ b/drivers/base/node.c @@ -132,6 +132,7 @@ static ssize_t node_read_meminfo(struct device *dev, nid, K(node_page_state(nid, NR_ANON_PAGES)), #endif nid, K(node_page_state(nid, NR_SHMEM)), + nid, K(i.sharedram), nid, node_page_state(nid, NR_KERNEL_STACK) * THREAD_SIZE / 1024, nid, K(node_page_state(nid, NR_PAGETABLE)), diff --git a/fs/proc/meminfo.c b/fs/proc/meminfo.c index 6eacdb027f5e..f671f1b1d255 100644 --- a/fs/proc/meminfo.c +++ b/fs/proc/meminfo.c @@ -142,7 +142,7 @@ static int meminfo_proc_show(struct seq_file *m, void *v) K(global_page_state(NR_ANON_PAGES)), #endif K(global_page_state(NR_FILE_MAPPED)), - K(global_page_state(NR_SHMEM)), + K(i.sharedram), K(global_page_state(NR_SLAB_RECLAIMABLE) + global_page_state(NR_SLAB_UNRECLAIMABLE)), K(global_page_state(NR_SLAB_RECLAIMABLE)), diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 7795aa7da4d0..96de1f9eeeef 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -2837,7 +2837,7 @@ EXPORT_SYMBOL_GPL(si_mem_available); void si_meminfo(struct sysinfo *val) { val->totalram = totalram_pages; - val->sharedram = 0; + val->sharedram = global_page_state(NR_SHMEM); val->freeram = global_page_state(NR_FREE_PAGES); val->bufferram = nr_blockdev_pages(); val->totalhigh = totalhigh_pages; @@ -2853,6 +2853,7 @@ void si_meminfo_node(struct sysinfo *val, int nid) pg_data_t *pgdat = NODE_DATA(nid); val->totalram = pgdat->node_present_pages; + val->sharedram = node_page_state(nid, NR_SHMEM); val->freeram = node_page_state(nid, NR_FREE_PAGES); #ifdef CONFIG_HIGHMEM val->totalhigh = pgdat->node_zones[ZONE_HIGHMEM].present_pages;