Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

workqueue: doc: Add a note saturating the system_wq is not permitted

If something is expected to generate large number of concurrent works,
it should utilize its own dedicated workqueue rather than system wq.
Because this may saturate system_wq and potentially block other's works.
eg, cgroup release work. Let's document this as a note.

Signed-off-by: Chen Ridong <chenridong@huawei.com>
Signed-off-by: Tejun Heo <tj@kernel.org>

authored by

Chen Ridong and committed by
Tejun Heo
e3dddcfd 9852d85e

+5
+5
Documentation/core-api/workqueue.rst
··· 357 357 difference in execution characteristics between using a dedicated wq 358 358 and a system wq. 359 359 360 + Note: If something may generate more than @max_active outstanding 361 + work items (do stress test your producers), it may saturate a system 362 + wq and potentially lead to deadlock. It should utilize its own 363 + dedicated workqueue rather than the system wq. 364 + 360 365 * Unless work items are expected to consume a huge amount of CPU 361 366 cycles, using a bound wq is usually beneficial due to the increased 362 367 level of locality in wq operations and work item execution.