diff options
author | Tejun Heo <tj@kernel.org> | 2010-10-19 05:14:49 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2010-10-19 05:14:49 -0400 |
commit | 31ddd871fc3db73e2024cb3eb3ee5051edf5a80f (patch) | |
tree | 3a2d578ec9ebefecca5e4cad196023bbe1a7d0f2 | |
parent | 10ccd84695c2a03075bad2f4fc728575fe9051f8 (diff) |
workqueue: Clarify that schedule_on_each_cpu is synchronous
The documentation for schedule_on_each_cpu() states that it calls a
function on each online CPU from keventd. This can easily be
interpreted as an asyncronous call because the description does not
mention that flush_work is called. Clarify that it is synchronous.
tj: rephrased a bit
Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
-rw-r--r-- | kernel/workqueue.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 2c6871cbcbee..eb5c1972443a 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c | |||
@@ -2676,13 +2676,15 @@ int schedule_delayed_work_on(int cpu, | |||
2676 | EXPORT_SYMBOL(schedule_delayed_work_on); | 2676 | EXPORT_SYMBOL(schedule_delayed_work_on); |
2677 | 2677 | ||
2678 | /** | 2678 | /** |
2679 | * schedule_on_each_cpu - call a function on each online CPU from keventd | 2679 | * schedule_on_each_cpu - execute a function synchronously on each online CPU |
2680 | * @func: the function to call | 2680 | * @func: the function to call |
2681 | * | 2681 | * |
2682 | * Returns zero on success. | 2682 | * schedule_on_each_cpu() executes @func on each online CPU using the |
2683 | * Returns -ve errno on failure. | 2683 | * system workqueue and blocks until all CPUs have completed. |
2684 | * | ||
2685 | * schedule_on_each_cpu() is very slow. | 2684 | * schedule_on_each_cpu() is very slow. |
2685 | * | ||
2686 | * RETURNS: | ||
2687 | * 0 on success, -errno on failure. | ||
2686 | */ | 2688 | */ |
2687 | int schedule_on_each_cpu(work_func_t func) | 2689 | int schedule_on_each_cpu(work_func_t func) |
2688 | { | 2690 | { |