Commit 128ea9f
workqueue: Add system_percpu_wq and system_dfl_wq
Currently, if a user enqueue a work item using schedule_delayed_work() the
used wq is "system_wq" (per-cpu wq) while queue_delayed_work() use
WORK_CPU_UNBOUND (used when a cpu is not specified). The same applies to
schedule_work() that is using system_wq and queue_work(), that makes use
again of WORK_CPU_UNBOUND.
This lack of consistentcy cannot be addressed without refactoring the API.
system_wq is a per-CPU worqueue, yet nothing in its name tells about that
CPU affinity constraint, which is very often not required by users. Make it
clear by adding a system_percpu_wq.
system_unbound_wq should be the default workqueue so as not to enforce
locality constraints for random work whenever it's not required.
Adding system_dfl_wq to encourage its use when unbound work should be used.
Suggested-by: Tejun Heo <[email protected]>
Signed-off-by: Marco Crivellari <[email protected]>
Signed-off-by: Tejun Heo <[email protected]>1 parent 0ff41df commit 128ea9f
2 files changed
+14
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
427 | 427 | | |
428 | 428 | | |
429 | 429 | | |
430 | | - | |
| 430 | + | |
431 | 431 | | |
432 | 432 | | |
433 | 433 | | |
| |||
438 | 438 | | |
439 | 439 | | |
440 | 440 | | |
441 | | - | |
| 441 | + | |
442 | 442 | | |
443 | 443 | | |
444 | 444 | | |
| |||
455 | 455 | | |
456 | 456 | | |
457 | 457 | | |
458 | | - | |
| 458 | + | |
| 459 | + | |
459 | 460 | | |
460 | 461 | | |
461 | 462 | | |
| 463 | + | |
462 | 464 | | |
463 | 465 | | |
464 | 466 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
505 | 505 | | |
506 | 506 | | |
507 | 507 | | |
| 508 | + | |
| 509 | + | |
508 | 510 | | |
509 | 511 | | |
510 | 512 | | |
511 | 513 | | |
512 | 514 | | |
513 | 515 | | |
| 516 | + | |
| 517 | + | |
514 | 518 | | |
515 | 519 | | |
516 | 520 | | |
| |||
7816 | 7820 | | |
7817 | 7821 | | |
7818 | 7822 | | |
| 7823 | + | |
7819 | 7824 | | |
7820 | 7825 | | |
7821 | | - | |
7822 | | - | |
| 7826 | + | |
| 7827 | + | |
7823 | 7828 | | |
7824 | 7829 | | |
7825 | 7830 | | |
| |||
7830 | 7835 | | |
7831 | 7836 | | |
7832 | 7837 | | |
7833 | | - | |
7834 | | - | |
| 7838 | + | |
| 7839 | + | |
7835 | 7840 | | |
7836 | 7841 | | |
7837 | 7842 | | |
| |||
0 commit comments