From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Rob Clark <robdclark@gmail.com>
Cc: Alex Deucher <alexander.deucher@amd.com>,
Rob Clark <robdclark@chromium.org>,
Intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: [Intel-gfx] [RFC v2 0/5] Waitboost drm syncobj waits
Date: Mon, 20 Feb 2023 16:44:32 +0000 [thread overview]
Message-ID: <43aff648-df2d-4fa2-356c-b74f5e3a92e7@linux.intel.com> (raw)
In-Reply-To: <CAF6AEGsEq7Pyc6PMenPjufLDzw5VFtLPjZwOXim71DN5J5TcJw@mail.gmail.com>
On 20/02/2023 15:52, Rob Clark wrote:
> On Mon, Feb 20, 2023 at 3:33 AM Tvrtko Ursulin
> <tvrtko.ursulin@linux.intel.com> wrote:
>>
>>
>> On 17/02/2023 20:45, Rodrigo Vivi wrote:
[snip]
>> Yeah I agree. And as not all media use cases are the same, as are not
>> all compute contexts someone somewhere will need to run a series of
>> workloads for power and performance numbers. Ideally that someone would
>> be the entity for which it makes sense to look at all use cases, from
>> server room to client, 3d, media and compute for both. If we could get
>> the capability to run this in some automated fashion, akin to CI, we
>> would even have a chance to keep making good decisions in the future.
>>
>> Or we do some one off testing for this instance, but we still need a
>> range of workloads and parts to do it properly..
>>
>>>> I also think the "arms race" scenario isn't really as much of a
>>>> problem as you think. There aren't _that_ many things using the GPU
>>>> at the same time (compared to # of things using CPU). And a lot of
>>>> mobile games throttle framerate to avoid draining your battery too
>>>> quickly (after all, if your battery is dead you can't keep buying loot
>>>> boxes or whatever).
>>>
>>> Very good point.
>>
>> On this one I still disagree from the point of view that it does not
>> make it good uapi if we allow everyone to select themselves for priority
>> handling (one flavour or the other).
>
> There is plenty of precedent for userspace giving hints to the kernel
> about scheduling and freq mgmt. Like schedutil uclamp stuff.
> Although I think that is all based on cgroups.
I knew about SCHED_DEADLINE and that it requires CAP_SYS_NICE, but I did
not know about uclamp. Quick experiment with uclampset suggests it
indeed does not require elevated privilege. If that is indeed so, it is
good enough for me as a precedent.
It appears to work using sched_setscheduler so maybe could define
something similar in i915/xe, per context or per client, not sure.
Maybe it would start as a primitive implementation but the uapi would
not preclude making it smart(er) afterwards. Or passing along to GuC to
do it's thing with it.
> In the fence/syncobj case, I think we need per-wait hints.. because
> for a single process the driver will be doing both housekeeping waits
> and potentially urgent waits. There may also be some room for some
> cgroup or similar knobs to control things like what max priority an
> app can ask for, and whether or how aggressively the kernel responds
> to the "deadline" hints. So as far as "arms race", I don't think I'd
Per wait hints are okay I guess even with "I am important" in their name
if sched_setscheduler allows raising uclamp.min just like that. In which
case cgroup limits to mimick cpu uclamp also make sense.
> change anything about my "fence deadline" proposal.. but that it might
> just be one piece of the overall puzzle.
That SCHED_DEADLINE requires CAP_SYS_NICE does not worry you?
Regards,
Tvrtko
next prev parent reply other threads:[~2023-02-20 16:44 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-10 13:06 [RFC v2 0/5] Waitboost drm syncobj waits Tvrtko Ursulin
2023-02-10 13:06 ` [RFC 1/5] dma-fence: Track explicit waiters Tvrtko Ursulin
2023-02-10 13:06 ` [RFC 2/5] drm/syncobj: Mark syncobj waits as external waiters Tvrtko Ursulin
2023-02-10 13:06 ` [RFC 3/5] drm/i915: Waitboost external waits Tvrtko Ursulin
2023-02-10 13:06 ` [RFC 4/5] drm/i915: Mark waits as explicit Tvrtko Ursulin
2023-02-10 13:06 ` [RFC 5/5] drm/i915: Wait boost requests waited upon by others Tvrtko Ursulin
2023-02-14 19:14 ` [Intel-gfx] [RFC v2 0/5] Waitboost drm syncobj waits Rob Clark
2023-02-14 19:26 ` Rob Clark
2023-02-16 11:19 ` Tvrtko Ursulin
2023-02-16 15:43 ` Rob Clark
2023-02-16 18:19 ` Rodrigo Vivi
2023-02-16 19:59 ` Rob Clark
2023-02-17 12:56 ` Tvrtko Ursulin
2023-02-17 14:55 ` Rob Clark
2023-02-17 16:03 ` Tvrtko Ursulin
2023-02-17 17:00 ` Rob Clark
2023-02-17 20:45 ` Rodrigo Vivi
2023-02-17 23:38 ` Rob Clark
2023-02-20 11:33 ` Tvrtko Ursulin
2023-02-20 15:52 ` Rob Clark
2023-02-20 16:44 ` Tvrtko Ursulin [this message]
2023-02-20 16:51 ` Tvrtko Ursulin
2023-02-20 17:14 ` Rob Clark
2023-02-20 17:07 ` Rob Clark
2023-02-20 12:22 ` Tvrtko Ursulin
2023-02-20 15:45 ` Rob Clark
2023-02-20 15:56 ` Tvrtko Ursulin
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=43aff648-df2d-4fa2-356c-b74f5e3a92e7@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=Intel-gfx@lists.freedesktop.org \
--cc=alexander.deucher@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=robdclark@chromium.org \
--cc=robdclark@gmail.com \
--cc=rodrigo.vivi@intel.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