diff options
author | Tejun Heo <tj@kernel.org> | 2024-09-26 12:56:46 -1000 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2024-09-26 12:56:46 -1000 |
commit | b7b3b2dbae73b412c2d24b3d0ebf1110991e4510 (patch) | |
tree | a68dc4a4ee068205f3853d5eed05205be59aefe4 /rust/helpers/workqueue.c | |
parent | bba26bf356d1c1314a7bb24041c64c5784febbb0 (diff) |
sched_ext: Split the global DSQ per NUMA node
In the bypass mode, the global DSQ is used to schedule all tasks in simple
FIFO order. All tasks are queued into the global DSQ and all CPUs try to
execute tasks from it. This creates a lot of cross-node cacheline accesses
and scheduling across the node boundaries, and can lead to live-lock
conditions where the system takes tens of minutes to disable the BPF
scheduler while executing in the bypass mode.
Split the global DSQ per NUMA node. Each node has its own global DSQ. When a
task is dispatched to SCX_DSQ_GLOBAL, it's put into the global DSQ local to
the task's CPU and all CPUs in a node only consume its node-local global
DSQ.
This resolves a livelock condition which could be reliably triggered on an
2x EPYC 7642 system by running `stress-ng --race-sched 1024` together with
`stress-ng --workload 80 --workload-threads 10` while repeatedly enabling
and disabling a SCX scheduler.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: David Vernet <void@manifault.com>
Diffstat (limited to 'rust/helpers/workqueue.c')
0 files changed, 0 insertions, 0 deletions