lkml.org 
[lkml]   [2012]   [Sep]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 12/12] workqueue: avoid work_on_cpu() to interfere system_wq
Date
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


\
 
 \ /
  Last update: 2012-09-26 20:01    [W:0.253 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site