Skip to content

Commit 516d3dc

Browse files
Waiman-Longhtejun
authored andcommitted
workqueue: Fix kernel-doc comment of unplug_oldest_pwq()
Fix the kernel-doc comment of the unplug_oldest_pwq() function to enable proper processing and formatting of the embedded ASCII diagram. Signed-off-by: Waiman Long <longman@redhat.com> Signed-off-by: Tejun Heo <tj@kernel.org>
1 parent 49584bb commit 516d3dc

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

kernel/workqueue.c

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1787,14 +1787,12 @@ static bool pwq_activate_first_inactive(struct pool_workqueue *pwq, bool fill)
17871787
}
17881788

17891789
/**
1790-
* unplug_oldest_pwq - restart an oldest plugged pool_workqueue
1791-
* @wq: workqueue_struct to be restarted
1790+
* unplug_oldest_pwq - unplug the oldest pool_workqueue
1791+
* @wq: workqueue_struct where its oldest pwq is to be unplugged
17921792
*
1793-
* pwq's are linked into wq->pwqs with the oldest first. For ordered
1794-
* workqueues, only the oldest pwq is unplugged, the others are plugged to
1795-
* suspend execution until the oldest one is drained. When this happens, the
1796-
* next oldest one (first plugged pwq in iteration) will be unplugged to
1797-
* restart work item execution to ensure proper work item ordering.
1793+
* This function should only be called for ordered workqueues where only the
1794+
* oldest pwq is unplugged, the others are plugged to suspend execution to
1795+
* ensure proper work item ordering::
17981796
*
17991797
* dfl_pwq --------------+ [P] - plugged
18001798
* |
@@ -1804,6 +1802,11 @@ static bool pwq_activate_first_inactive(struct pool_workqueue *pwq, bool fill)
18041802
* 1 3 5
18051803
* | | |
18061804
* 2 4 6
1805+
*
1806+
* When the oldest pwq is drained and removed, this function should be called
1807+
* to unplug the next oldest one to start its work item execution. Note that
1808+
* pwq's are linked into wq->pwqs with the oldest first, so the first one in
1809+
* the list is the oldest.
18071810
*/
18081811
static void unplug_oldest_pwq(struct workqueue_struct *wq)
18091812
{

0 commit comments

Comments
 (0)