Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Andrea Righi <arighi@nvidia.com>
To: stable@vger.kernel.org, Tejun Heo <tj@kernel.org>,
	David Vernet <void@manifault.com>,
	Changwoo Min <changwoo@igalia.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Sasha Levin <sashal@kernel.org>,
	Kuba Piecuch <jpiecuch@google.com>,
	fangqiurong <fangqiurong@kylinos.cn>,
	Rahad Bhuiya <rahadbhuiya2021@gmail.com>,
	sched-ext@lists.linux.dev
Subject: [PATCH 7.1.y 0/8] sched_ext: Backport dispatch and task-state fixes
Date: Sat, 28 Nov 2026 11:23:43 +0100	[thread overview]
Message-ID: <20261128102535.655465-1-arighi@nvidia.com> (raw)

Backport sched_ext ops.dequeue() and stale task state fixes.

These fixes correct ops.dequeue() callback behavior, synchronize
dispatch state and reset task fields when leaving SCX. These core fixes
allow schedulers that rely on the kernel's task lifecycle guarantees
(e.g., scx_bpfland) to operate correctly.

- Patches 1-6 use the older, unsplit sources and static DSQ helpers.
  Reuse the 7.2 backports where applicable, keeping the existing wakeup
  flag handling and dump helpers instead of pulling in later refactors.
- Patch 7 targets the older kernel/sched/ext.c disable path.
- Patch 8 resets the fields directly in the READY exit path because
  7.1 lacks scx_reset_task_fields().

Tested with CONFIG_SCHED_CLASS_EXT=y and CONFIG_PROVE_LOCKING=y.
All 30 sched_ext tests passed, including a task-field reset regression
test. scx_bpfland also passed load/unload testing under CPU load.

Andrea Righi (1):
  sched_ext: Reset dsq_vtime and slice when a task leaves SCX

Kuba Piecuch (4):
  sched_ext: Check remote rq eligibility under task's rq lock
  sched_ext: Call ops.dequeue() when a task arrives on a remote local
    DSQ
  sched_ext: Wait for SCX_OPSS_DISPATCHING before moving tasks off DSQs
  sched_ext: Generate qseq from a per-task counter

Rahad Bhuiya (1):
  sched_ext: Reset task fields on exit of an SCX_TASK_READY task

Tejun Heo (1):
  sched_ext: Wait for SCX_OPSS_DISPATCHING before reenqueueing a task

fangqiurong (1):
  sched_ext: Don't run ops.dequeue() with a DSQ lock held

 include/linux/sched/ext.h   |   1 +
 kernel/sched/ext.c          | 130 +++++++++++++++++++++++++-----------
 kernel/sched/ext_internal.h |  28 +++++---
 kernel/sched/sched.h        |   1 -
 4 files changed, 109 insertions(+), 51 deletions(-)


base-commit: 81d3924095fd017e473332a9b6dd6dd0e3d9a59b
-- 
2.56.1

             reply	other threads:[~2026-11-28 10:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-28 10:23 Andrea Righi [this message]
2026-11-28 10:23 ` [PATCH 7.1.y 1/8] sched_ext: Check remote rq eligibility under task's rq lock Andrea Righi
2026-11-28 10:23 ` [PATCH 7.1.y 2/8] sched_ext: Don't run ops.dequeue() with a DSQ lock held Andrea Righi
2026-11-28 10:23 ` [PATCH 7.1.y 3/8] sched_ext: Call ops.dequeue() when a task arrives on a remote local DSQ Andrea Righi
2026-11-28 10:23 ` [PATCH 7.1.y 4/8] sched_ext: Wait for SCX_OPSS_DISPATCHING before reenqueueing a task Andrea Righi
2026-11-28 10:23 ` [PATCH 7.1.y 5/8] sched_ext: Wait for SCX_OPSS_DISPATCHING before moving tasks off DSQs Andrea Righi
2026-11-28 10:23 ` [PATCH 7.1.y 6/8] sched_ext: Generate qseq from a per-task counter Andrea Righi
2026-11-28 10:23 ` [PATCH 7.1.y 7/8] sched_ext: Reset dsq_vtime and slice when a task leaves SCX Andrea Righi
2026-11-28 10:23 ` [PATCH 7.1.y 8/8] sched_ext: Reset task fields on exit of an SCX_TASK_READY task Andrea Righi

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=20261128102535.655465-1-arighi@nvidia.com \
    --to=arighi@nvidia.com \
    --cc=changwoo@igalia.com \
    --cc=fangqiurong@kylinos.cn \
    --cc=gregkh@linuxfoundation.org \
    --cc=jpiecuch@google.com \
    --cc=rahadbhuiya2021@gmail.com \
    --cc=sashal@kernel.org \
    --cc=sched-ext@lists.linux.dev \
    --cc=stable@vger.kernel.org \
    --cc=tj@kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox