[PATCHSET sched_ext/for-7.3] sched_ext: Update core-sched task ordering for scheduler hierarchies

Tejun Heo <[email protected]>
Newsgroups dev.linux.lists.sched-ext,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
Hello,

Core-sched task ordering predates sub-schedulers. scx_prio_less() consults
ops.core_sched_before() only when both tasks belong to the same scheduler,
and the timestamp fallback maintains its own stamp, p->scx.core_sched_at,
under two different stamping rules. This patchset updates core-sched task
ordering for scheduler hierarchies:

- Fix ops.core_sched_before() being invoked with inverted polarity.

- Replace core_sched_at with p->scx.runnable_at which the stall watchdog
  already maintains, so that the fallback follows one wait-tracking rule.
  A running task orders after every waiting task.

- Order a pair of tasks spanning two schedulers by the nearest common
  ancestor which implements ops.core_sched_before().

- Drop a dead core-sched related test in the dequeue path.

This patchset contains the following four patches:

 0001-sched_ext-Fix-inverted-ops.core_sched_before-invocat.patch
 0002-sched_ext-Use-runnable_at-for-the-default-core-sched.patch
 0003-sched_ext-Make-core-sched-task-ordering-hierarchy-aw.patch
 0004-sched_ext-Drop-the-dead-SCX_DEQ_CORE_SCHED_EXEC-test.patch

and is on top of sched_ext/for-7.3 (3167bd3e0c22). The patches are also
available in the following git branch:

 git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext.git core-sched-hier

diffstat follows. Thanks.

 include/linux/sched/ext.h      |   3 -
 kernel/sched/ext/ext.c         | 147 +++++++++++++++++------------------------
 kernel/sched/ext/internal.h    |   5 ++
 tools/sched_ext/scx_qmap.bpf.c |  23 +++++--
 4 files changed, 81 insertions(+), 97 deletions(-)

--
tejun
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.