Commit 31ddd871 authored by Tejun Heo's avatar Tejun Heo

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: default avatarMel Gorman <mel@csn.ul.ie>
Reviewed-by: default avatarKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent 10ccd846
...@@ -2676,13 +2676,15 @@ int schedule_delayed_work_on(int cpu, ...@@ -2676,13 +2676,15 @@ int schedule_delayed_work_on(int cpu,
EXPORT_SYMBOL(schedule_delayed_work_on); EXPORT_SYMBOL(schedule_delayed_work_on);
/** /**
* schedule_on_each_cpu - call a function on each online CPU from keventd * schedule_on_each_cpu - execute a function synchronously on each online CPU
* @func: the function to call * @func: the function to call
* *
* Returns zero on success. * schedule_on_each_cpu() executes @func on each online CPU using the
* Returns -ve errno on failure. * system workqueue and blocks until all CPUs have completed.
*
* schedule_on_each_cpu() is very slow. * schedule_on_each_cpu() is very slow.
*
* RETURNS:
* 0 on success, -errno on failure.
*/ */
int schedule_on_each_cpu(work_func_t func) int schedule_on_each_cpu(work_func_t func)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment