Skip to contentSkip to conversation

proc, meminfo: Use correct helpers for calculating LRU sizes in meminfo

PATCH Applied Mel Gorman 1 participant 1 message Aug 5, 2016

Subsystems (4)
lore
Share & tools
lore

Mel Gorman

author
#0 lore raw

PATCH 1/1 proc, meminfo: Use correct helpers for calculating LRU sizes in meminfo

meminfo_proc_show and si_mem_available are using the wrong helpers for calculating the size of the LRUs. The user-visible impact is that there appears to be an abnormally high number of unevictable pages.

---
 fs/proc/meminfo.c | 2 +-
 mm/page_alloc.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
fs/proc/meminfo.c +1 -1
index 09e18fdf61e5..b9a8c813e5e6 100644
@@ -46,7 +46,7 @@ static int meminfo_proc_show(struct seq_file *m, void *v)
 		cached = 0;
 
 	for (lru = LRU_BASE; lru < NR_LRU_LISTS; lru++)
-		pages[lru] = global_page_state(NR_LRU_BASE + lru);
+		pages[lru] = global_node_page_state(NR_LRU_BASE + lru);
 
 	available = si_mem_available();
 
mm/page_alloc.c +1 -1
index fb975cec3518..baa97da3687d 100644
@@ -4064,7 +4064,7 @@ long si_mem_available(void)
 	int lru;
 
 	for (lru = LRU_BASE; lru < NR_LRU_LISTS; lru++)
-		pages[lru] = global_page_state(NR_LRU_BASE + lru);
+		pages[lru] = global_node_page_state(NR_LRU_BASE + lru);
 
 	for_each_zone(zone)
 		wmark_low += zone->watermark[WMARK_LOW];