History

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.

Waiman Long committed 2 years ago

Commit 516d3dc1 parent 49584bb1 file · +10 −7Browse files

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

Unified · Split

kernel/workqueue.c+10−7
@@ -1787,14 +1787,12 @@ static bool pwq_activate_first_inactive(struct pool_workqueue *pwq, bool fill) · 1786 unmodified lines
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) · 3 unmodified lines
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 {