From: Philipp Stanner <phasta@kernel.org>
To: "Matthew Brost" <matthew.brost@intel.com>,
"Danilo Krummrich" <dakr@kernel.org>,
"Philipp Stanner" <phasta@kernel.org>,
"Christian König" <ckoenig.leichtzumerken@gmail.com>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Sumit Semwal" <sumit.semwal@linaro.org>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
linux-media@vger.kernel.org
Subject: [PATCH 3/3] drm/sched: Add TODO entry for missing runqueue locks
Date: Fri, 17 Oct 2025 15:47:03 +0200 [thread overview]
Message-ID: <20251017134716.187723-4-phasta@kernel.org> (raw)
In-Reply-To: <20251017134716.187723-2-phasta@kernel.org>
struct drm_sched_rq is not being locked at many places throughout the
scheduler, at least for readers. This was documented in a FIXME added
in:
commit 981b04d96856 ("drm/sched: improve docs around drm_sched_entity")
Add a TODO entry for that problem.
Signed-off-by: Philipp Stanner <phasta@kernel.org>
---
drivers/gpu/drm/scheduler/TODO | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/drivers/gpu/drm/scheduler/TODO b/drivers/gpu/drm/scheduler/TODO
index 6a06e2858dd6..f4b5bee8e3eb 100644
--- a/drivers/gpu/drm/scheduler/TODO
+++ b/drivers/gpu/drm/scheduler/TODO
@@ -25,3 +25,16 @@
3. Port a driver as first user.
3. Document the new alternative in the docu of deprecated
drm_sched_resubmit_jobs().
+
+* Unlocked readers for runqueues
+ - Difficulty: medium
+ - Contact: Philipp Stanner <phasta@kernel.org>
+ - Description:
+ There is an old FIXME by Sima in include/drm/gpu_scheduler.h. It details
+ that struct drm_sched_rq is read at many places without any locks, not even
+ with a READ_ONCE. At XDC 2025 no one could really tell why that is the case,
+ whether locks are needed and whether they could be added. (But for real,
+ that should probably be locked!).
+ - Tasks:
+ 1. Check whether locks for runqueue readers can be added.
+ 2. If yes, add the locks.
--
2.49.0
prev parent reply other threads:[~2025-10-17 13:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-17 13:47 [PATCH 1/3] drm/sched: Remove out of place resubmit docu Philipp Stanner
2025-10-17 13:47 ` [PATCH 2/3] drm/sched: Add TODO file with first entry Philipp Stanner
2025-10-17 13:47 ` Philipp Stanner [this message]
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=20251017134716.187723-4-phasta@kernel.org \
--to=phasta@kernel.org \
--cc=airlied@gmail.com \
--cc=ckoenig.leichtzumerken@gmail.com \
--cc=dakr@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=matthew.brost@intel.com \
--cc=simona@ffwll.ch \
--cc=sumit.semwal@linaro.org \
/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