Skip to content

Commit 2f95ff9

Browse files
gormanmtorvalds
authored andcommitted
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. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Mel Gorman <[email protected]> Cc: Dave Chinner <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent c1470b3 commit 2f95ff9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

fs/proc/meminfo.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ static int meminfo_proc_show(struct seq_file *m, void *v)
4646
cached = 0;
4747

4848
for (lru = LRU_BASE; lru < NR_LRU_LISTS; lru++)
49-
pages[lru] = global_page_state(NR_LRU_BASE + lru);
49+
pages[lru] = global_node_page_state(NR_LRU_BASE + lru);
5050

5151
available = si_mem_available();
5252

mm/page_alloc.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -4060,7 +4060,7 @@ long si_mem_available(void)
40604060
int lru;
40614061

40624062
for (lru = LRU_BASE; lru < NR_LRU_LISTS; lru++)
4063-
pages[lru] = global_page_state(NR_LRU_BASE + lru);
4063+
pages[lru] = global_node_page_state(NR_LRU_BASE + lru);
40644064

40654065
for_each_zone(zone)
40664066
wmark_low += zone->watermark[WMARK_LOW];

0 commit comments

Comments
 (0)