Skip to content

sched: Handle split scheduling and execution contexts in task ticks

Hui Su lkml sched-ext 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest4 patches 2 repliesIn review
  2. v45 patches 9 repliesSuperseded

Changes in v5 from the cover letter

- Rework FAIR task-tick handling into one donor-owned block followed by one execution-context block, with NUMA and cache work in the latter.
- Keep task_tick_scx() donor-gated pending the separate sched_ext/proxy execution integration.
- Preserve the donor core-slice baseline across same-donor synthetic reselects, while resetting it for a new donor or explicit set-next reactivation.
- Drop the RT watchdog patch from this series; continue that work separately.

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4sched: Dispatch task ticks for donor and execution classeskernel/sched/core.c kernel/sched/deadline.c kernel/sched/ext/ext.c +5 more+74 -332 replies
2/4sched/numa: Drive NUMA task tick from execution contextkernel/sched/fair.c+24 -220 replies
3/4sched/cache: Drive cache task tick from execution contextkernel/sched/fair.c+5 -40 replies
4/4sched/core: Fix donor slice accounting under proxy executionkernel/sched/fair.c kernel/sched/sched.h+20 -90 replies

Reviews trailers per patch

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

Read the v5 thread

Cover letter [PATCH v5 0/4] sched: Handle split scheduling and execution contexts in task ticks

Proxy execution separates the task selected for scheduling from the task whose execution state advances. This series dispatches scheduler ticks to both contexts, keeps NUMA and cache work tied to the execution task, and accounts core-scheduling slice service across same-donor execution-owner handoffs.

Scheduling-class policy work remains donor-owned, while execution-context consumers use rq->curr. The core-scheduling fix keeps a per-runqueue donor service baseline so a synthetic same-donor proxy reselect preserves service already consumed on behalf of the donor.

Changes since v4:

- Rework FAIR task-tick handling into one donor-owned block followed by one execution-context block, with NUMA and cache work in the latter.
- Keep task_tick_scx() donor-gated pending the separate sched_ext/proxy execution integration.
- Preserve the donor core-slice baseline across same-donor synthetic reselects, while resetting it for a new donor or explicit set-next reactivation.
- Drop the RT watchdog patch from this series; continue that work separately.

Validation:

- x86_64 vmlinux/modules/bzImage builds passed with the main configuration and CONFIG_SCHED_PROXY_EXEC=n, CONFIG_SCHED_CORE=n, CONFIG_SCHED_CACHE=n, CONFIG_FAIR_GROUP_SCHED=n, CONFIG_NUMA_BALANCING=y, and CONFIG_SCHED_CLASS_EXT=y variants. sched_ext selftests also built successfully with the SCX-enabled kernel.
- x86_64 QEMU boot smoke and feature-off boot tests: PASS.
- Exact-head two-node NUMA/proxy smoke: PASS.
- Previous validation of the unchanged patch content covers scheduler selftests, NO_HZ_FULL proxy smoke, and SMT core-scheduling behavior.
- A focused same-donor CORE-01 test split service across two execution owners. Each individual portion stayed below the force-idle threshold, while accumulated donor service crossed it with one core_sched_start baseline.

No mixed sched_ext/proxy runtime was run because the configurations are currently mutually exclusive. Runtime validation was performed on x86_64 only; no 32-bit or ARM runtime validation was performed for this revision.

Hui Su (4):
sched: Dispatch task ticks for donor and execution classes sched/numa: Drive NUMA task tick from execution context sched/cache: Drive cache task tick from execution context sched/core: Fix donor slice accounting under proxy execution

 kernel/sched/core.c      | 22 ++++++++++--
 kernel/sched/deadline.c  | 10 ++++--
 kernel/sched/ext/ext.c   | 22 +++++++++---
 kernel/sched/fair.c      | 77 ++++++++++++++++++++++++----------------
 kernel/sched/idle.c      |  8 ++---
 kernel/sched/rt.c        | 13 ++++---
 kernel/sched/sched.h     |  4 ++-
 kernel/sched/stop_task.c |  5 ++-
 8 files changed, 108 insertions(+), 53 deletions(-)

base-commit: cba2348ab114391f5b1a00fa65c5b739f13f0563

Signature · 1 line
2.55.0