Skip to content

Commit

Permalink
Include count of pagecache pages in show_mem() output
Browse files Browse the repository at this point in the history
The show_mem() output does not include the total number of pagecache
pages.  This would be helpful when analyzing the debug information in
the /var/log/messages file after OOM kills occur.

This patch includes the total pagecache pages in that output.

Signed-off-by: Larry Woodman <lwoodman@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Larry Woodman authored and Linus Torvalds committed Feb 5, 2008
1 parent a2b3456 commit e6f3602
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1874,6 +1874,8 @@ void show_free_areas(void)
printk("= %lukB\n", K(total));
}

printk("%ld total pagecache pages\n", global_page_state(NR_FILE_PAGES));

show_swap_cache_info();
}

Expand Down

0 comments on commit e6f3602

Please sign in to comment.