Skip to content

Commit

Permalink
workqueue: Clarify that schedule_on_each_cpu is synchronous
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tejun Heo committed Oct 19, 2010
1 parent 10ccd84 commit 31ddd87
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions kernel/workqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -2676,13 +2676,15 @@ int schedule_delayed_work_on(int cpu,
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
*
* Returns zero on success.
* Returns -ve errno on failure.
*
* schedule_on_each_cpu() executes @func on each online CPU using the
* system workqueue and blocks until all CPUs have completed.
* schedule_on_each_cpu() is very slow.
*
* RETURNS:
* 0 on success, -errno on failure.
*/
int schedule_on_each_cpu(work_func_t func)
{
Expand Down

0 comments on commit 31ddd87

Please sign in to comment.