diff options
Diffstat (limited to 'kernel/workqueue.c')
-rw-r--r-- | kernel/workqueue.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index cfc737bffe6d..17c2f03d2c27 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 |
@@ -98,7 +99,7 @@ static void __queue_work(struct cpu_workqueue_struct *cwq, | |||
98 | * @wq: workqueue to use | 99 | * @wq: workqueue to use |
99 | * @work: work to queue | 100 | * @work: work to queue |
100 | * | 101 | * |
101 | * Returns non-zero if it was successfully added. | 102 | * Returns 0 if @work was already on a queue, non-zero otherwise. |
102 | * | 103 | * |
103 | * We queue the work to the CPU it was submitted, but there is no | 104 | * We queue the work to the CPU it was submitted, but there is no |
104 | * guarantee that it will be processed by that CPU. | 105 | * guarantee that it will be processed by that CPU. |
@@ -137,7 +138,7 @@ static void delayed_work_timer_fn(unsigned long __data) | |||
137 | * @work: work to queue | 138 | * @work: work to queue |
138 | * @delay: number of jiffies to wait before queueing | 139 | * @delay: number of jiffies to wait before queueing |
139 | * | 140 | * |
140 | * Returns non-zero if it was successfully added. | 141 | * Returns 0 if @work was already on a queue, non-zero otherwise. |
141 | */ | 142 | */ |
142 | int fastcall queue_delayed_work(struct workqueue_struct *wq, | 143 | int fastcall queue_delayed_work(struct workqueue_struct *wq, |
143 | struct work_struct *work, unsigned long delay) | 144 | struct work_struct *work, unsigned long delay) |
@@ -168,7 +169,7 @@ EXPORT_SYMBOL_GPL(queue_delayed_work); | |||
168 | * @work: work to queue | 169 | * @work: work to queue |
169 | * @delay: number of jiffies to wait before queueing | 170 | * @delay: number of jiffies to wait before queueing |
170 | * | 171 | * |
171 | * Returns non-zero if it was successfully added. | 172 | * Returns 0 if @work was already on a queue, non-zero otherwise. |
172 | */ | 173 | */ |
173 | int queue_delayed_work_on(int cpu, struct workqueue_struct *wq, | 174 | int queue_delayed_work_on(int cpu, struct workqueue_struct *wq, |
174 | struct work_struct *work, unsigned long delay) | 175 | struct work_struct *work, unsigned long delay) |
@@ -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; |