summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorRik van Riel <riel@redhat.com>2014-02-18 17:12:44 -0500
committerThomas Gleixner <tglx@linutronix.de>2014-02-21 21:27:10 +0100
commit3cf1962cdbf6b3a9e3ef21116d215bbab350ea37 (patch)
treeeb6a13b68e96e4be4f1da403b720db17849150c6 /kernel
parent495163420ab5398c84af96ca3eae2c6aa4a140da (diff)
sched,numa: add cond_resched to task_numa_work
Normally task_numa_work scans over a fairly small amount of memory, but it is possible to run into a large unpopulated part of virtual memory, with no pages mapped. In that case, task_numa_work can run for a while, and it may make sense to reschedule as required. Cc: akpm@linux-foundation.org Cc: Andrea Arcangeli <aarcange@redhat.com> Signed-off-by: Rik van Riel <riel@redhat.com> Reported-by: Xing Gang <gang.xing@hp.com> Tested-by: Chegu Vinod <chegu_vinod@hp.com> Signed-off-by: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/1392761566-24834-2-git-send-email-riel@redhat.com Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched/fair.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 966cc2bfcb77..78157099b167 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -1757,6 +1757,8 @@ void task_numa_work(struct callback_head *work)
start = end;
if (pages <= 0)
goto out;
+
+ cond_resched();
} while (end != vma->vm_end);
}