From: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
To: phasta@kernel.org, "Matthew Brost" <matthew.brost@intel.com>,
"Danilo Krummrich" <dakr@kernel.org>,
"Christian König" <ckoenig.leichtzumerken@gmail.com>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/sched: Extend locking in drm_sched_entity_select_rq()
Date: Thu, 26 Nov 2026 16:39:09 +0000 [thread overview]
Message-ID: <947b762d-1530-4302-a330-1c234538281a@igalia.com> (raw)
In-Reply-To: <5922ac007b35e54e8b0c60a04cc55fb7fc88d72e.camel@mailbox.org>
On 26/11/2026 16:14, Philipp Stanner wrote:
> On Tue, 2026-11-17 at 10:37 +0100, Philipp Stanner wrote:
>> drm_sched_entity_select_rq() evaluates entity->sched_list locklessly,
>> which is elsewhere always lock-protected. Another lockless check regards
>> spsc_queue_count(). spsc_queue is evaluated under lock protection at
>> many places already and the plan is to replace it with fully locked
>> infrastructure anyways.
>>
>> Move the spin_lock() in drm_sched_entity_select_rq() upwards.
>
> Tvrtko, Christian, objections with merging that for now?
I don't have any huge objections but it is a bit underwhelming aka we
don't get anything much with it really.
I was hoping my series which ends with "drm/sched: Address the fence_seq
fixme" would get some more attention because it basically ends with a
similar but perhaps a better result, where the lock actually goes one
level up to drm_sched_job_arm and atomic_t fence_seq gets removed. So we
can say there are some tangible benefits in that case.
But it is not just that series and the sched_list confusion it fixes,
but also since in this commit message you elude to spsc queue removal,
that's another one which we have sitting in limbo.
I mean it's all well and good moving spsc_queue_count under a lock but,
again, it doesn't gain us much. In the spsc removal sketch I have for
example demonstrated how that we can easily remove that
spsc_queue_count, plus some spsc_queue_peeks. In theory that could be
done even without the full spsc queue removal.
Perhaps we could close on all those opens somehow?
Regards,
Tvrtko
prev parent reply other threads:[~2026-11-26 16:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-17 9:37 Philipp Stanner
2026-11-26 16:14 ` Philipp Stanner
2026-11-26 16:39 ` Tvrtko Ursulin [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=947b762d-1530-4302-a330-1c234538281a@igalia.com \
--to=tvrtko.ursulin@igalia.com \
--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=maarten.lankhorst@linux.intel.com \
--cc=matthew.brost@intel.com \
--cc=mripard@kernel.org \
--cc=phasta@kernel.org \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
/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®