[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a3c7b8f7-0f2c-4e0c-a55d-3e4433f795db@igalia.com>
Date: Thu, 23 Oct 2025 12:18:16 +0100
From: Tvrtko Ursulin <tvrtko.ursulin@...lia.com>
To: Danilo Krummrich <dakr@...nel.org>
Cc: dri-devel@...ts.freedesktop.org, amd-gfx@...ts.freedesktop.org,
kernel-dev@...lia.com, intel-xe@...ts.freedesktop.org,
cgroups@...r.kernel.org, linux-kernel@...r.kernel.org,
Christian König <christian.koenig@....com>,
Leo Liu <Leo.Liu@....com>, Maíra Canal <mcanal@...lia.com>,
Matthew Brost <matthew.brost@...el.com>, Michal Koutný
<mkoutny@...e.com>, Michel Dänzer
<michel.daenzer@...lbox.org>, Philipp Stanner <phasta@...nel.org>,
Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@....com>,
Rob Clark <robdclark@...il.com>, Tejun Heo <tj@...nel.org>,
Alexandre Courbot <acourbot@...dia.com>, Alistair Popple
<apopple@...dia.com>, John Hubbard <jhubbard@...dia.com>,
Joel Fernandes <joelagnelf@...dia.com>, Timur Tabi <ttabi@...dia.com>,
Alex Deucher <alexander.deucher@....com>,
Lucas De Marchi <lucas.demarchi@...el.com>,
Thomas Hellström <thomas.hellstrom@...ux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@...el.com>,
Boris Brezillon <boris.brezillon@...labora.com>,
Rob Herring <robh@...nel.org>, Steven Price <steven.price@....com>,
Liviu Dudau <liviu.dudau@....com>,
Daniel Almeida <daniel.almeida@...labora.com>,
Alice Ryhl <aliceryhl@...gle.com>, Boqun Feng <boqunf@...flix.com>,
Grégoire Péan <gpean@...flix.com>
Subject: Re: [RFC v8 00/21] DRM scheduling cgroup controller
On 29/09/2025 15:07, Danilo Krummrich wrote:
> On Wed Sep 3, 2025 at 5:23 PM CEST, Tvrtko Ursulin wrote:
>> This is another respin of this old work^1 which since v7 is a total rewrite and
>> completely changes how the control is done.
>
> I only got some of the patches of the series, can you please send all of them
> for subsequent submissions? You may also want to consider resending if you're
> not getting a lot of feedback due to that. :)
There is so many cc across the series that I am reluctant to copy
everyone on all patches. So I count on people being subscribed to
mailing lists and being able to look into the archives if all else fails.
Regarding the luke warm response here is short video showing it in action:
https://people.igalia.com/tursulin/drm_cgroup.mp4
Please ignore the typos made in the video commentary but I would say it
is worth a watch.
Lets see if that helps to paint a picture to people on what this can do.
With some minimum imagination different use cases are obvious as well.
For example start a compute job in the background with the UI still
being responsive.
>> On the userspace interface side of things it is the same as before. We have
>> drm.weight as an interface, taking integers from 1 to 10000, the same as CPU and
>> IO cgroup controllers.
>
> In general, I think it would be good to get GPU vendors to speak up to what kind
> of interfaces they're heading to with firmware schedulers and potential firmware
> APIs to control scheduling; especially given that this will be a uAPI.
>
> (Adding a couple of folks to Cc.)
>
> Having that said, I think the basic drm.weight interface is fine and should work
> in any case; i.e. with the existing DRM GPU scheduler in both modes, the
> upcoming DRM Jobqueue efforts and should be generic enough to work with
> potential firmware interfaces we may see in the future.Yes, basic drm.weight should not be controversial at all.
For all drivers which use the DRM scheduler in the 1:N mode it is
trivial to wire the support up once the "fair" DRM scheduler lands.
Trivial because scheduling weight is directly compatible with virtual
GPU time accounting fair scheduler implements. This series has an
example how to do it for amdgpu and many other simple drivers could do
it exactly like with a few lines of boilerplate code.
For some 1:1 firmware scheduling drivers, like xe for example, patch
series also includes a sketch on how it could make use drm.weight by
giving firmware a hint what is the most important, and what is least
important. In practice that is also usable for some use cases. (In fact
the demo video above was made with xe! Results with amdgpu are pretty
similar but I hit some snags with screen recording on that device.)
Possibly the main problem causing the luke warm response, as far as I
understood during the XDC last month, is what to do about the drivers
where seemingly neither approach can be implemented.
Like nouveau for example. Thinking seems to be it couldn't be wired up.
I don't know that driver nor hardware (firmware) so I cannot say.
To satisfy that concern one idea I had is that perhaps I could expose a
new control file like drm.weight_supported or something, which could
have a semantics along the lines of:
+ - all active client/drivers in the cgroup support the feature
? - a mix of supported and unsupported
- - none support the drm.weight feature
That would give visibility to the "Why is this thing not doing anything
on my system?" question. Then over time solutions on how to support even
those problematic drivers with closed firmware could be found. There
will certainly be motivation not to be the one with worse user experience.
Regards,
Tvrtko
Powered by blists - more mailing lists