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

Hui Su posted 4 patches 1 week, 5 days ago
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(-)
[PATCH v5 0/4] sched: Handle split scheduling and execution contexts in task ticks
Posted by Hui Su 1 week, 5 days ago
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.

Link: https://lore.kernel.org/r/20260909092901.2989564-1-sh_def@163.com

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
-- 
2.55.0