summaryrefslogtreecommitdiff
path: root/fs/proc/task_mmu.c
diff options
context:
space:
mode:
authorVinayak Menon <vinmenon@codeaurora.org>2017-05-26 16:29:55 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2017-05-31 23:37:47 -0700
commit7cf864f5515b15e7aba6b48d3799949fb62065eb (patch)
treefbfb0358632eda2fa0c6400b1a92ba0e773d3598 /fs/proc/task_mmu.c
parenta5706c4fdac1a427fac7b30a49912a1d9d148cb9 (diff)
mm: process reclaim: skip locked vmas
Skip VMA_LOCKED vmas from being reclaimed. Not doing so results in pages in unevictable lrus to be passed for reclaim which can cause issues. In one such reported problem, the trylock_page in shrink_page_list fails and reclaim path decides to keep the page and hits VM_BUG_ON_PAGE since PageUnevictable is set. Change-Id: I58947faeb5226cf8578541d7fdcd474a24f8c40f Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
Diffstat (limited to 'fs/proc/task_mmu.c')
-rw-r--r--fs/proc/task_mmu.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index fc5243c331c4..420f623e3441 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -1518,6 +1518,9 @@ struct reclaim_param reclaim_task_anon(struct task_struct *task,
if (vma->vm_file)
continue;
+ if (vma->vm_flags & VM_LOCKED)
+ continue;
+
if (!rp.nr_to_reclaim)
break;