Skip to content

Commit 5814346

Browse files
Chen Ridonghtejun
authored andcommitted
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 <[email protected]> Signed-off-by: Tejun Heo <[email protected]>
1 parent e3dddcf commit 5814346

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Documentation/core-api/workqueue.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,8 @@ CPU which can be assigned to the work items of a wq. For example, with
245245
at the same time per CPU. This is always a per-CPU attribute, even for
246246
unbound workqueues.
247247

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
250250
such that they are not the limiting factor while providing protection in
251251
runaway cases.
252252

include/linux/workqueue.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ enum wq_flags {
412412
};
413413

414414
enum wq_consts {
415-
WQ_MAX_ACTIVE = 512, /* I like 512, better ideas? */
415+
WQ_MAX_ACTIVE = 2048, /* I like 2048, better ideas? */
416416
WQ_UNBOUND_MAX_ACTIVE = WQ_MAX_ACTIVE,
417417
WQ_DFL_ACTIVE = WQ_MAX_ACTIVE / 2,
418418

0 commit comments

Comments
 (0)