History

Further 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, and further says that the penalty for failing to nail down the specified CPU is that the workqueue handler might find itself executing on some other CPU. This is true as far as it goes, but fails to note what happens if the specified CPU never was online. Therefore, further expand this comment to say that specifying a CPU that was never online will result in a splat.

Paul E. McKenney committed 3 years ago

Commit 854f5cc1 parent ba0ad6e1 file · +2 −0Browse files

Showing the changes to kernel/workqueue.c (1 of 1 file). Show all

Unified · Split

kernel/workqueue.c+2−0
@@ -1539,6 +1539,8 @@ out: · 1538 unmodified lines
15391539 * We queue the work to a specific CPU, the caller must ensure it
15401540 * can't go away. Callers that fail to ensure that the specified
15411541 * CPU cannot go away will execute on a randomly chosen CPU.
1542+ * But note well that callers specifying a CPU that never has been
1543+ * online will get a splat.
15421544 *
15431545 * Return: %false if @work was already on a queue, %true otherwise.
15441546 */