mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
mm: oom analysis: add shmem vmstat
Recently we encountered OOM problems due to memory use of the GEM cache. Generally a large amuont of Shmem/Tmpfs pages tend to create a memory shortage problem. We often use the following calculation to determine the amount of shmem pages: shmem = NR_ACTIVE_ANON + NR_INACTIVE_ANON - NR_ANON_PAGES however the expression does not consider isolated and mlocked pages. This patch adds explicit accounting for pages used by shmem and tmpfs. Signed-off-by: KOSAKI Motohiro <[email protected]> Acked-by: Rik van Riel <[email protected]> Reviewed-by: Christoph Lameter <[email protected]> Acked-by: Wu Fengguang <[email protected]> Cc: David Rientjes <[email protected]> Cc: Hugh Dickins <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
c6a7f5728a
commit
4b02108ac1
7 changed files with 18 additions and 3 deletions
|
|
@ -644,7 +644,7 @@ static const char * const vmstat_text[] = {
|
|||
"nr_bounce",
|
||||
"nr_vmscan_write",
|
||||
"nr_writeback_temp",
|
||||
|
||||
"nr_shmem",
|
||||
#ifdef CONFIG_NUMA
|
||||
"numa_hit",
|
||||
"numa_miss",
|
||||
|
|
|
|||
Loading…
Reference in a new issue