diff options
author | Christoph Lameter <clameter@sgi.com> | 2006-10-11 04:21:26 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-11 14:14:19 -0400 |
commit | 469340236a7c9673df3e6a2425f559517f01464e (patch) | |
tree | 83453754d7e3ac5d9d16fbd19374c66899938afe /kernel | |
parent | fc513a333b45f8913d40c8241a0cb61be79e1c60 (diff) |
[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: Christoph 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: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/workqueue.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index cfc737bffe6d..3df9bfc7ff78 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/notifier.h> | 28 | #include <linux/notifier.h> |
29 | #include <linux/kthread.h> | 29 | #include <linux/kthread.h> |
30 | #include <linux/hardirq.h> | 30 | #include <linux/hardirq.h> |
31 | #include <linux/mempolicy.h> | ||
31 | 32 | ||
32 | /* | 33 | /* |
33 | * The per-CPU workqueue (if single thread, we always use the first | 34 | * The per-CPU workqueue (if single thread, we always use the first |
@@ -245,6 +246,12 @@ static int worker_thread(void *__cwq) | |||
245 | sigprocmask(SIG_BLOCK, &blocked, NULL); | 246 | sigprocmask(SIG_BLOCK, &blocked, NULL); |
246 | flush_signals(current); | 247 | flush_signals(current); |
247 | 248 | ||
249 | /* | ||
250 | * We inherited MPOL_INTERLEAVE from the booting kernel. | ||
251 | * Set MPOL_DEFAULT to insure node local allocations. | ||
252 | */ | ||
253 | numa_default_policy(); | ||
254 | |||
248 | /* SIG_IGN makes children autoreap: see do_notify_parent(). */ | 255 | /* SIG_IGN makes children autoreap: see do_notify_parent(). */ |
249 | sa.sa.sa_handler = SIG_IGN; | 256 | sa.sa.sa_handler = SIG_IGN; |
250 | sa.sa.sa_flags = 0; | 257 | sa.sa.sa_flags = 0; |