diff options
| author | Hui Su <sh_def@163.com> | 2026-09-16 01:31:38 +0900 |
|---|---|---|
| committer | Peter Zijlstra <peterz@infradead.org> | 2026-09-25 12:45:58 +0200 |
| commit | fbbc63fed0b09c8c5cf3972db8922ae98406ceec (patch) | |
| tree | 1cb39cbacc5aba4c6f3a1d2f030ccafff3cc36eb /kernel/locking | |
| parent | 819224e506bc7c2d61ec6a58ec6e876b505abce9 (diff) | |
| download | linux-next-fbbc63fed0b09c8c5cf3972db8922ae98406ceec.tar.gz linux-next-fbbc63fed0b09c8c5cf3972db8922ae98406ceec.zip | |
sched/core: Remove redundant core_sched_seq
core_sched_seq records whether an rq has consumed the pick made by the
last core-wide selection.
However, rq->core_pick already carries the same per-rq state. A core-wide
selection leaves core_pick populated only for siblings which still need to
consume their picks. It is cleared when the current CPU consumes its pick,
when a sibling is already running the selected task, or when a pending pick
is consumed through the fastpath. The CPU offline path clears it as well.
core_task_seq and core_pick_seq serve a separate purpose. core_task_seq
changes when the task set changes and for each new core-wide pick, while
core_pick_seq records the task sequence on which the selection was made.
Their equality therefore establishes that a pending core_pick is still
valid.
Consequently, once core_pick_seq == core_task_seq, a non-NULL core_pick is
sufficient to tell that this rq still has a pick to consume.
core_sched_seq duplicates that pending/consumed state.
Remove core_sched_seq and use core_pick directly as the pending marker.
Testing included an instrumented comparison of the old and new pending
predicates under core-scheduling stress. Additional guest tests exercised
repeated core-cookie lifecycles, forced idle, and CPU hotplug under load.
No predicate divergence or kernel warning was observed.
Signed-off-by: Hui Su <sh_def@163.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20260915163138.2973969-1-sh_def@163.com
Diffstat (limited to 'kernel/locking')
0 files changed, 0 insertions, 0 deletions
