Fix the kernel-doc comment of the unplug_oldest_pwq() function to enable proper processing and formatting of the embedded ASCII diagram.
Showing the changes to kernel/workqueue.c (1 of 1 file). Show all
Unified · Split
| @@ -1787,14 +1787,12 @@ static bool pwq_activate_first_inactive(struct pool_workqueue *pwq, bool fill) · 1786 unmodified lines | ||
| 1787 | 1787 | } |
| 1788 | 1788 | |
| 1789 | 1789 | /** |
| 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 | |
| 1792 | 1792 | * |
| 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:: | |
| 1798 | 1796 | * |
| 1799 | 1797 | * dfl_pwq --------------+ [P] - plugged |
| 1800 | 1798 | * | |
| @@ -1804,6 +1802,11 @@ static bool pwq_activate_first_inactive(struct pool_workqueue *pwq, bool fill) · 3 unmodified lines | ||
| 1804 | 1802 | * 1 3 5 |
| 1805 | 1803 | * | | | |
| 1806 | 1804 | * 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. | |
| 1807 | 1810 | */ |
| 1808 | 1811 | static void unplug_oldest_pwq(struct workqueue_struct *wq) |
| 1809 | 1812 | { |