From: Oscar Mateo <oscar.mateo@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [RFC 4/4] drm/i915: Expose RPCS (SSEU) configuration to userspace
Date: Tue, 2 May 2017 15:00:27 +0000 [thread overview]
Message-ID: <7693c0e9-4e21-4e3f-1be7-356adc67cc1d@intel.com> (raw)
In-Reply-To: <20170502195500.GG19680@nuc-i3427.alporthouse.com>
On 05/02/2017 07:55 PM, Chris Wilson wrote:
> On Tue, May 02, 2017 at 10:33:19AM +0000, Oscar Mateo wrote:
>>
>> On 05/02/2017 11:49 AM, Chris Wilson wrote:
>>> We want to allow userspace to reconfigure the subslice configuration for
>>> its own use case. To do so, we expose a context parameter to allow
>>> adjustment of the RPCS register stored within the context image (and
>>> currently not accessible via LRI).
>> Userspace could also do this by themselves via LRI if we simply
>> whitelist GEN8_R_PWR_CLK_STATE.
>>
>> Hardware people suggested this programming model:
>>
>> - PIPECONTROL - Stalling flish, flush all caches (color, depth, DC$)
>> - LOAD_REGISTER_IMMEDIATE - R_PWR_CLK_STATE
>> - Reprogram complete state
> Hmm, treating it as a complete state wipe is a nuisance, but fairly
> trivial. The simplest way will be for the user to execute the LRI batch
> as part of creating the context. But there will be some use cases where
> dynamic reconfiguration within an active context will be desired, I'm
> sure.
Exactly, in this way the UMD gets the best of both worlds: they can do
the LRI once and forget about it, or they can reconfigure on-demand.
>>> If the context is adjusted before
>>> first use, the adjustment is for "free"; otherwise if the context is
>>> active we flush the context off the GPU (stalling all users) and forcing
>>> the GPU to save the context to memory where we can modify it and so
>>> ensure that the register is reloaded on next execution.
>> There is another cost associated with the adjustment: slice poweron
>> and shutdown do take some time to happen (in the order of tens of
>> usecs). I have been playing with an i-g-t benchmark to measure this
>> delay, I'll send it to the mailing list.
> Hmm, I thought the argument for why selecting smaller subslices gave
> better performance was that it was restoring the whole set between
> contexts, even when the configuration between contexts was the same.
Hmmm... it's the first time I hear that particular argument. I can
definitely see the delay when changing the configuration (also, powering
slices on takes a little bit more than switching them down) but no
difference when I am just switching between contexts with the same
configuration.
Until now, the most convincing argument I've heard is that thread
scheduling is much more efficient with just one slice when you don't
really need more, but maybe that doesn't explain the whole picture.
> As always numbers demonstrating the advantage, perhaps explaining why
> it helps, and also for spotting when we break it are most welcome :)
> -Chris
I can provide numbers for the slice configuration delay (numbers that
have to be taken into account by the UMD when deciding which
configuration to use) but I think Dimitry is in a better position to
provide numbers for the advantage.
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-05-02 22:00 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-02 11:49 [RFC 1/4] drm/i915: Record both min/max eu_per_subslice in sseu_dev_info Chris Wilson
2017-05-02 11:49 ` [RFC 2/4] drm/i915: Program RPCS for Broadwell Chris Wilson
2017-05-02 12:22 ` Joonas Lahtinen
2017-05-02 19:32 ` Lionel Landwerlin
2017-05-02 11:49 ` [RFC 3/4] drm/i915: Record the sseu configuration per-context Chris Wilson
2017-05-02 11:49 ` [RFC 4/4] drm/i915: Expose RPCS (SSEU) configuration to userspace Chris Wilson
2017-05-02 10:33 ` Oscar Mateo
2017-05-02 19:55 ` Chris Wilson
2017-05-02 15:00 ` Oscar Mateo [this message]
2017-05-09 9:52 ` Lionel Landwerlin
2017-07-11 17:14 ` Lionel Landwerlin
2017-05-02 12:08 ` ✓ Fi.CI.BAT: success for series starting with [RFC,1/4] drm/i915: Record both min/max eu_per_subslice in sseu_dev_info Patchwork
2017-05-02 12:13 ` [RFC 1/4] " Joonas Lahtinen
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=7693c0e9-4e21-4e3f-1be7-356adc67cc1d@intel.com \
--to=oscar.mateo@intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.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