From: Mel Gorman Date: Thu, 19 Dec 2013 01:08:40 +0000 (-0800) Subject: sched: numa: skip inaccessible VMAs X-Git-Tag: upstream/snapshot3+hdmi~3754^2~15 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;ds=inline;h=3c67f474558748b604e247d92b55dfe89654c81d;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git sched: numa: skip inaccessible VMAs Inaccessible VMA should not be trapping NUMA hint faults. Skip them. Signed-off-by: Mel Gorman Reviewed-by: Rik van Riel Cc: Alex Thorlton Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 9030da7..c7395d9 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -1738,6 +1738,13 @@ void task_numa_work(struct callback_head *work) (vma->vm_file && (vma->vm_flags & (VM_READ|VM_WRITE)) == (VM_READ))) 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);