Messages in this thread Patch in this message | | | From | Lai Jiangshan <> | Subject | [PATCH 12/12] workqueue: avoid work_on_cpu() to interfere system_wq | Date | Thu, 27 Sep 2012 01:20:43 +0800 |
| |
We can't expect how long the work of work_on_cpu() will run. So move it to system_long_wq to avoid it interfere system_wq.
Note: The initial implement(2d3854a3) of work_on_cpu() uses its own workqueue.
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com> --- kernel/workqueue.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index ccb1d60..c14d94c 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -3638,7 +3638,7 @@ long work_on_cpu(unsigned int cpu, long (*fn)(void *), void *arg) struct work_for_cpu wfc = { .fn = fn, .arg = arg }; INIT_WORK_ONSTACK(&wfc.work, work_for_cpu_fn); - schedule_work_on(cpu, &wfc.work); + queue_work_on(cpu, system_long_wq, &wfc.work); flush_work(&wfc.work); return wfc.ret; } -- 1.7.7.6
| |