Re: [PATCH v5 2/3] workqueue: doc: Add a note saturating the system_wq is not permitted
From: Michal Koutný
Date: Mon Sep 30 2024 - 08:50:30 EST
Hi.
On Fri, Sep 27, 2024 at 04:08:26PM GMT, Chen Ridong <chenridong@xxxxxxxxxxxxxxx> wrote:
> How about:
> Note: If something may generate works frequently, it may saturate the
> system_wq and potentially lead to deadlock. It should utilize its own
> dedicated workqueue rather than system wq.
It doesn't depend only on generating frequency (in Tetsuo's example with
slow works, the "high" would only be 256/s) and accurate information is
likely only empirical, thus I'd refine it further:
> 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.
(besides @max_active reference, I also changed generic system_wq to
system wq as the surrounding text seems to refer to any of the
system_*wq)
Michal
Attachment:
signature.asc
Description: PGP signature