]> Git Repo - J-linux.git/commitdiff
workqueue: doc: Add a note saturating the system_wq is not permitted
authorChen Ridong <[email protected]>
Tue, 8 Oct 2024 11:24:57 +0000 (11:24 +0000)
committerTejun Heo <[email protected]>
Tue, 8 Oct 2024 18:46:42 +0000 (08:46 -1000)
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 <[email protected]>
Signed-off-by: Tejun Heo <[email protected]>
Documentation/core-api/workqueue.rst

index 16f861c9791e4ae2914bbf517c1a1835263711bf..2b813f80ce39c59c22aa7a4301062809085af04c 100644 (file)
@@ -357,6 +357,11 @@ Guidelines
   difference in execution characteristics between using a dedicated wq
   and a system wq.
 
+  Note: If something may generate more than @max_active outstanding
+  work items (do stress test your producers), it may saturate a system
+  wq and potentially lead to deadlock. It should utilize its own
+  dedicated workqueue rather than the system wq.
+
 * Unless work items are expected to consume a huge amount of CPU
   cycles, using a bound wq is usually beneficial due to the increased
   level of locality in wq operations and work item execution.
This page took 0.051669 seconds and 4 git commands to generate.