Skip to content

sched_ext: Honor SCX_PICK_IDLE_CORE in CPU selection shortcuts

Hui Su bpf lkml sched-ext stable 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2sched_ext: idle: Honor SCX_PICK_IDLE_CORE in CPU selection shortcutskernel/sched/ext/idle.c+5 -10 replies
2/2selftests/sched_ext: Cover strict-core CPU selection shortcutstools/testing/selftests/sched_ext/allowed_cpus.bpf.c tools/testing/selftests/sched_ext/allowed_cpus.c+342 -100 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] sched_ext: Honor SCX_PICK_IDLE_CORE in CPU selection shortcuts

The restricted select_cpu kfunc path and the normal WAKE_SYNC shortcuts can bypass SCX_PICK_IDLE_CORE on SMT systems. The first patch skips the WAKE_SYNC shortcuts when strict-core selection is requested and validates restricted candidates against their idle SMT mask. The second patch covers the restricted path and both WAKE_SYNC shortcuts while retaining the generic smoke test when no SMT pair is available.

This series is based on:

[PATCH v3] sched_ext: idle: Respect task affinity in restricted CPU selection
https://lore.kernel.org/lkml/[email protected]/

Testing:
- x86_64 KVM/QEMU: all three restricted/WAKE_SYNC differential cases reproduced the strict-core violation before the fix and returned -EBUSY after it.
- The sched_ext selftests passed apart from an unrelated dsp_local_on environment failure while opening system Kconfig.
- The strict-core test passed 50 consecutive runs; non-SMT coverage retained the generic smoke test and skipped the SMT-specific cases.

Hui Su (2):
sched_ext: idle: Honor SCX_PICK_IDLE_CORE in CPU selection shortcuts selftests/sched_ext: Cover strict-core CPU selection shortcuts

 kernel/sched/ext/idle.c                       |   6 +-
 .../selftests/sched_ext/allowed_cpus.bpf.c    |  36 +-
 .../selftests/sched_ext/allowed_cpus.c        | 316 +++++++++++++++++-
 3 files changed, 347 insertions(+), 11 deletions(-)

base-commit: 9a2d086eba0f331eb5940d6a91efa7caa39080ad

Signature · 1 line
2.55.0