From: Andrea Righi <arighi@nvidia.com>
To: Tejun Heo <tj@kernel.org>, David Vernet <void@manifault.com>,
Changwoo Min <changwoo@igalia.com>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH v2 0/2] sched_ext: Introduce rq lock tracking
Date: Sun, 20 Apr 2025 21:30:20 +0200 [thread overview]
Message-ID: <20250420193106.42533-1-arighi@nvidia.com> (raw)
Add rq lock tracking to sched_ext ops callbacks to enable scx_bpf_*()
kfuncs to detect whether a specific rq is currently locked and safely
operate with it.
If no rq is locked, the target rq lock can be acquired. If a different rq
is already locked, the operation can either fail (triggering an ops error),
deferred using IRQ work, or managed accordingly to avoid deadlocks.
This patchset is also available in the following git branch:
git://git.kernel.org/pub/scm/linux/kernel/git/arighi/linux.git scx-rq-lock-tracking
Changes in v2:
- store currently locked rq in a percpu variable
- link to v1: https://lore.kernel.org/all/20250419123536.154469-1-arighi@nvidia.com
Andrea Righi (2):
sched_ext: Track currently locked rq
sched_ext: Fix missing rq lock in scx_bpf_cpuperf_set()
kernel/sched/ext.c | 163 ++++++++++++++++++++++++++++++++----------------
kernel/sched/ext_idle.c | 2 +-
2 files changed, 110 insertions(+), 55 deletions(-)
next reply other threads:[~2025-04-20 19:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-20 19:30 Andrea Righi [this message]
2025-04-20 19:30 ` [PATCH 1/2] sched_ext: Track currently locked rq Andrea Righi
2025-04-21 19:03 ` Tejun Heo
2025-04-22 6:27 ` Andrea Righi
2025-04-20 19:30 ` [PATCH 2/2] sched_ext: Fix missing rq lock in scx_bpf_cpuperf_set() Andrea Righi
2025-04-21 7:44 ` Changwoo Min
2025-04-21 8:35 ` Andrea Righi
2025-04-21 19:04 ` 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=20250420193106.42533-1-arighi@nvidia.com \
--to=arighi@nvidia.com \
--cc=changwoo@igalia.com \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®