All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: David Vernet <void@manifault.com>,
	Andrea Righi <arighi@nvidia.com>,
	Changwoo Min <changwoo@igalia.com>
Cc: sched-ext@lists.linux.dev, Emil Tsalapatis <emil@etsalapatis.com>,
	linux-kernel@vger.kernel.org, Tejun Heo <tj@kernel.org>
Subject: [PATCHSET sched_ext/for-7.3] sched_ext: Update core-sched task ordering for scheduler hierarchies
Date: Sat, 15 Aug 2026 14:05:23 -1000	[thread overview]
Message-ID: <20260816000527.988170-1-tj@kernel.org> (raw)

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

             reply	other threads:[~2026-08-16  0:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-16  0:05 Tejun Heo [this message]
2026-08-16  0:05 ` [PATCH 1/4] sched_ext: Fix inverted ops.core_sched_before() invocation Tejun Heo
2026-08-16  0:05 ` [PATCH 2/4] sched_ext: Use runnable_at for the default core-sched task ordering Tejun Heo
2026-08-16  0:05 ` [PATCH 3/4] sched_ext: Make core-sched task ordering hierarchy-aware Tejun Heo
2026-08-16  0:05 ` [PATCH 4/4] sched_ext: Drop the dead SCX_DEQ_CORE_SCHED_EXEC test in dequeue_task_scx() Tejun Heo
2026-08-16  2:13 ` [PATCHSET sched_ext/for-7.3] sched_ext: Update core-sched task ordering for scheduler hierarchies Tejun Heo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260816000527.988170-1-tj@kernel.org \
    --to=tj@kernel.org \
    --cc=arighi@nvidia.com \
    --cc=changwoo@igalia.com \
    --cc=emil@etsalapatis.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sched-ext@lists.linux.dev \
    --cc=void@manifault.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.