提交 46934023 编写于 作者: C Christoph Lameter 提交者: Linus Torvalds

[PATCH] mm: kevent threads: use MPOL_DEFAULT

Switch the memory policy of the kevent threads to MPOL_DEFAULT while
leaving the kzalloc of the workqueue structure on interleave.  This means
that all code executed in the context of the kevent thread is allocating
node local.
Signed-off-by: NChristoph Lameter <clameter@sgi.com>
Cc: Christoph Lameter <clameter@sgi.com>
Cc: Alok Kataria <alok.kataria@calsoftinc.com>
Cc: Andi Kleen <ak@suse.de>
Cc: <pj@sgi.com>
Cc: <shai@scalex86.org>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 fc513a33
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include <linux/notifier.h> #include <linux/notifier.h>
#include <linux/kthread.h> #include <linux/kthread.h>
#include <linux/hardirq.h> #include <linux/hardirq.h>
#include <linux/mempolicy.h>
/* /*
* The per-CPU workqueue (if single thread, we always use the first * The per-CPU workqueue (if single thread, we always use the first
...@@ -245,6 +246,12 @@ static int worker_thread(void *__cwq) ...@@ -245,6 +246,12 @@ static int worker_thread(void *__cwq)
sigprocmask(SIG_BLOCK, &blocked, NULL); sigprocmask(SIG_BLOCK, &blocked, NULL);
flush_signals(current); flush_signals(current);
/*
* We inherited MPOL_INTERLEAVE from the booting kernel.
* Set MPOL_DEFAULT to insure node local allocations.
*/
numa_default_policy();
/* SIG_IGN makes children autoreap: see do_notify_parent(). */ /* SIG_IGN makes children autoreap: see do_notify_parent(). */
sa.sa.sa_handler = SIG_IGN; sa.sa.sa_handler = SIG_IGN;
sa.sa.sa_flags = 0; sa.sa.sa_flags = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册