From 7cf864f5515b15e7aba6b48d3799949fb62065eb Mon Sep 17 00:00:00 2001 From: Vinayak Menon Date: Fri, 26 May 2017 16:29:55 +0530 Subject: 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 --- fs/proc/task_mmu.c | 3 +++ 1 file changed, 3 insertions(+) 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; -- cgit v1.2.3