From: Boris Brezillon <boris.brezillon@collabora.com>
To: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Cc: dri-devel@lists.freedesktop.org,
Steven Price <steven.price@arm.com>,
Liviu Dudau <liviu.dudau@arm.com>, Chia-I Wu <olvaffe@gmail.com>,
Danilo Krummrich <dakr@kernel.org>,
Matthew Brost <matthew.brost@intel.com>,
Philipp Stanner <phasta@kernel.org>,
kernel-dev@igalia.com
Subject: Re: [RFC 2/8] drm/panthor: Use separate workqueue for DRM scheduler
Date: Thu, 9 Jul 2026 17:24:52 +0200 [thread overview]
Message-ID: <20260709172452.486e845f@fedora-2.home> (raw)
In-Reply-To: <ffc05a67-66ff-4e0a-98f3-a9e4e87af6b0@igalia.com>
On Thu, 9 Jul 2026 15:33:01 +0100
Tvrtko Ursulin <tvrtko.ursulin@igalia.com> wrote:
> >> But in principle I am fine with going with N workers. It's just a matter
> >> of what is N derived from and how big it is. It could be even be passed
> >> to alloc_workqueue in the today's code base but I accept there is not
> >> much value to that since I don't think there are SoC's with a Mali GPU
> >> and server level number of CPU cores.
> >
> > I think we can start with one ordered-wq per prio level. So basically
> > what you intended to do in this patch, but instead of having a single
> > ordered-wq, we have four of them (one per prio). It doesn't address the
> > fact run_job() on non-resident groups might hit their ringbuf before
> > resident ones, but that's probably good enough as a first step, and as
> > you pointed out, the current locking forces this serialization with no
> > more guarantee regarding who's going to be served first anyway, so it
> > can't be worse than it already is.
>
> Lets for a moment assume the kthread_worker idea will not fly due to xe,
> or any other reason really. Also since the option for RT workqueues is
> unexpectedly on the table. In that case, and assuming RT workqueues will
> happen, could a feasible plan for panthor be to create three workqueues:
>
> 1. One unbound with max_active = 2 for low and medium group priority.
> 2. Another unbound + WQ_HIGHPRI, also with max_active = 2 for high.
> 3. And one unbound + WQ_REALTIME, again max_active = 2 for realtime.
>
> For high and realtime max_active either 2 or 1 on dual core, if there
> are such SoCs. Two threads ensure same priority clients are able to keep
> the GPU fed.
>
> One issue is that you mentioned you would like dynamic priority changes
> and with this it may be tricky. But ignoring that for the moment, and
> the discussion on how to handle other panthor workers which take part in
> the execution flow post submit, this should pretty much address the
> submit latency from userspace to ->run_job(). What do you think, is it
> worth entertaining this alternative?
I think that would do, yes.
next prev parent reply other threads:[~2026-07-09 15:24 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-02 14:37 [RFC 0/8] DRM scheduler kthread_worker for submission latency improvements Tvrtko Ursulin
2026-07-02 14:37 ` [RFC 1/8] drm/panthor: Remove redundant drm_sched_job_cleanup() from the .free_job callback Tvrtko Ursulin
2026-07-03 15:00 ` Steven Price
2026-07-09 10:05 ` Tvrtko Ursulin
2026-07-09 10:15 ` Boris Brezillon
2026-07-09 12:16 ` Tvrtko Ursulin
2026-07-02 14:37 ` [RFC 2/8] drm/panthor: Use separate workqueue for DRM scheduler Tvrtko Ursulin
2026-07-02 15:31 ` Boris Brezillon
2026-07-06 12:03 ` Tvrtko Ursulin
2026-07-06 14:18 ` Boris Brezillon
2026-07-08 16:47 ` Tvrtko Ursulin
2026-07-09 6:45 ` Boris Brezillon
2026-07-09 10:56 ` Tvrtko Ursulin
2026-07-09 12:19 ` Boris Brezillon
2026-07-09 14:33 ` Tvrtko Ursulin
2026-07-09 15:24 ` Boris Brezillon [this message]
2026-07-02 14:37 ` [RFC 3/8] drm/sched: Use generic naming for workqueue helpers Tvrtko Ursulin
2026-07-02 14:37 ` [RFC 4/8] drm/xe: Convert to per gt scheduler workers Tvrtko Ursulin
2026-07-03 9:06 ` Matthew Brost
2026-07-06 12:27 ` Tvrtko Ursulin
2026-07-06 23:14 ` Matthew Brost
2026-07-08 16:35 ` Tvrtko Ursulin
2026-07-08 19:32 ` Matthew Brost
2026-07-09 11:35 ` Tvrtko Ursulin
2026-07-09 11:45 ` Matthew Brost
2026-07-09 12:05 ` Tvrtko Ursulin
2026-07-02 14:37 ` [RFC 5/8] drm: Wrap DRM scheduler worker in own abstraction Tvrtko Ursulin
2026-07-02 14:37 ` [RFC 6/8] drm/sched: Convert the scheduler job submission to kthread_worker Tvrtko Ursulin
2026-07-02 14:37 ` [RFC 7/8] drm/sched: Add ability to change drm_sched_worker priority Tvrtko Ursulin
2026-07-02 14:37 ` [RFC 8/8] drm/sched: Notify worker of the entity submission priority Tvrtko Ursulin
2026-07-03 8:52 ` [RFC 0/8] DRM scheduler kthread_worker for submission latency improvements Philipp Stanner
2026-07-06 12:20 ` Tvrtko Ursulin
2026-07-06 19:36 ` Tejun Heo
2026-07-08 16:24 ` Tvrtko Ursulin
2026-07-09 8:28 ` Tvrtko Ursulin
2026-07-10 12:29 ` Tvrtko Ursulin
2026-07-10 16:11 ` Tejun Heo
2026-07-10 18:29 ` Matthew Brost
2026-07-03 9:22 ` Matthew Brost
2026-07-06 12:41 ` Tvrtko Ursulin
2026-07-06 22:54 ` Matthew Brost
2026-07-07 7:12 ` Matthew Brost
2026-07-08 17:01 ` Tvrtko Ursulin
2026-07-08 20:46 ` Matthew Brost
2026-07-08 22:39 ` Matthew Brost
2026-07-09 6:52 ` Boris Brezillon
2026-07-09 7:25 ` Boris Brezillon
2026-07-09 7:55 ` Matthew Brost
2026-07-09 10:08 ` Boris Brezillon
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=20260709172452.486e845f@fedora-2.home \
--to=boris.brezillon@collabora.com \
--cc=dakr@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel-dev@igalia.com \
--cc=liviu.dudau@arm.com \
--cc=matthew.brost@intel.com \
--cc=olvaffe@gmail.com \
--cc=phasta@kernel.org \
--cc=steven.price@arm.com \
--cc=tvrtko.ursulin@igalia.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