From: Mel Gorman Date: Thu, 19 Dec 2013 01:08:40 +0000 (-0800) Subject: sched: numa: skip inaccessible VMAs X-Git-Url: http://git.mmlx.us/?a=commitdiff_plain;h=13ea54872ad94976129d88a6e7d841bf689a180b;p=linux-edison.git sched: numa: skip inaccessible VMAs commit 3c67f474558748b604e247d92b55dfe89654c81d upstream. Inaccessible VMA should not be trapping NUMA hint faults. Skip them. Signed-off-by: Mel Gorman Reviewed-by: Rik van Riel Cc: Alex Thorlton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index da7eebb22b0..ce60006132b 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -936,6 +936,13 @@ void task_numa_work(struct callback_head *work) if (vma->vm_end - vma->vm_start < HPAGE_SIZE) continue; + /* + * Skip inaccessible VMAs to avoid any confusion between + * PROT_NONE and NUMA hinting ptes + */ + if (!(vma->vm_flags & (VM_READ | VM_EXEC | VM_WRITE))) + continue; + do { start = max(start, vma->vm_start); end = ALIGN(start + (pages << PAGE_SHIFT), HPAGE_SIZE);