Skip to content

Commit 443378f

Browse files
paulmckrcuhtejun
authored andcommitted
workqueue: Upgrade queue_work_on() comment
The current queue_work_on() docbook comment says that the caller must ensure that the specified CPU can't go away, but does not spell out the consequences, which turn out to be quite mild. Therefore expand this comment to explicitly say that the penalty for failing to nail down the specified CPU is that the workqueue handler might find itself executing on some other CPU. Cc: Tejun Heo <[email protected]> Cc: Lai Jiangshan <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]> Signed-off-by: Tejun Heo <[email protected]>
1 parent 58e1100 commit 443378f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

kernel/workqueue.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1531,7 +1531,8 @@ static void __queue_work(int cpu, struct workqueue_struct *wq,
15311531
* @work: work to queue
15321532
*
15331533
* We queue the work to a specific CPU, the caller must ensure it
1534-
* can't go away.
1534+
* can't go away. Callers that fail to ensure that the specified
1535+
* CPU cannot go away will execute on a randomly chosen CPU.
15351536
*
15361537
* Return: %false if @work was already on a queue, %true otherwise.
15371538
*/

0 commit comments

Comments
 (0)