Skip to content

Commit

Permalink
proc, meminfo: use correct helpers for calculating LRU sizes in meminfo
Browse files Browse the repository at this point in the history
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/20160805105805.GR2799@techsingularity.net
Signed-off-by: Mel Gorman <mgorman@techsingularity.net>
Cc: Dave Chinner <david@fromorbit.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Mel Gorman authored and Linus Torvalds committed Aug 11, 2016
1 parent c1470b3 commit 2f95ff9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fs/proc/meminfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
2 changes: 1 addition & 1 deletion mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -4060,7 +4060,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];
Expand Down

0 comments on commit 2f95ff9

Please sign in to comment.