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

workqueue: Adjust WQ_MAX_ACTIVE from 512 to 2048

WQ_MAX_ACTIVE is currently set to 512, which was established approximately
15 yeas ago. However, with the significant increase in machine sizes and
capabilities, the previous limit of 256 concurrent tasks is no longer
sufficient. Therefore, we propose to increase WQ_MAX_ACTIVE to 2048.
and WQ_DFL_ACTIVE is 1024 now.

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
58143465 e3dddcfd

+3 -3
+2 -2
Documentation/core-api/workqueue.rst
··· 245 245 at the same time per CPU. This is always a per-CPU attribute, even for 246 246 unbound workqueues. 247 247 248 - The maximum limit for ``@max_active`` is 512 and the default value used 249 - when 0 is specified is 256. These values are chosen sufficiently high 248 + The maximum limit for ``@max_active`` is 2048 and the default value used 249 + when 0 is specified is 1024. These values are chosen sufficiently high 250 250 such that they are not the limiting factor while providing protection in 251 251 runaway cases. 252 252
+1 -1
include/linux/workqueue.h
··· 412 412 }; 413 413 414 414 enum wq_consts { 415 - WQ_MAX_ACTIVE = 512, /* I like 512, better ideas? */ 415 + WQ_MAX_ACTIVE = 2048, /* I like 2048, better ideas? */ 416 416 WQ_UNBOUND_MAX_ACTIVE = WQ_MAX_ACTIVE, 417 417 WQ_DFL_ACTIVE = WQ_MAX_ACTIVE / 2, 418 418