Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: "Teres Alexis, Alan Previn" <alan.previn.teres.alexis@intel.com>
Cc: "intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>,
	"Upadhyay, Tejas" <tejas.upadhyay@intel.com>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"Belgaumkar, Vinay" <vinay.belgaumkar@intel.com>
Subject: Re: [PATCH V9] drm/xe/uapi: Use hint for guc to set GT frequency
Date: Wed, 12 Feb 2025 11:31:06 -0500	[thread overview]
Message-ID: <Z6zMypgRtTKR3-Fg@intel.com> (raw)
In-Reply-To: <96603cd51996168d49598bcc5e2987976905befe.camel@intel.com>

On Wed, Feb 12, 2025 at 03:38:06PM +0000, Teres Alexis, Alan Previn wrote:
> On Wed, 2025-02-12 at 17:48 +0530, Tejas Upadhyay wrote:
> > Allow user to provide a low latency hint. When set, KMD sends a hint
> > to GuC which results in special handling for that process. SLPC will
> > ramp the GT frequency aggressively every time it switches to this
> > process.
> > 
> > We need to enable the use of SLPC Compute strategy during init, but
> > it will apply only to processes that set this bit during process
> > creation.
> > 
> > Improvement with this approach as below:
> > 
> > Before,
> > 
> > :~$ NEOReadDebugKeys=1 EnableDirectSubmission=0 clpeak --kernel-latency
> > Platform: Intel(R) OpenCL Graphics
> >   Device: Intel(R) Graphics [0xe20b]
> >     Driver version  : 24.52.0 (Linux x64)
> >     Compute units   : 160
> >     Clock frequency : 2850 MHz
> >     Kernel launch latency : 283.16 us
> > 
> > After,
> > 
> > :~$ NEOReadDebugKeys=1 EnableDirectSubmission=0 clpeak --kernel-latency
> > Platform: Intel(R) OpenCL Graphics
> >   Device: Intel(R) Graphics [0xe20b]
> >     Driver version  : 24.52.0 (Linux x64)
> >     Compute units   : 160
> >     Clock frequency : 2850 MHz
> > 
> >     Kernel launch latency : 63.38 us
> > 
> > UMD Compute PR : https://github.com/intel/compute-runtime/pull/794
> > UMD Mesa PR :  https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33214
> > 
> might be a silly question: looking at the UMD patches, am i reading it wrong but it looks like the UMDs are just going
> to always enable low latency hint (as long as hw/kernel supports it)?

This flag makes a lot of sense for Compute, so they might always enabled that indeed.
For Mesa side they always enable, when user has selected certain config. But the default
there is to never use it.

> I mean if that is the system level direction, then
> why require a method for user-space to request, just always enable in kernel?

We have considered the option of always setting the flag when LR VM is in use,
that would cover compute. But the i915 experience shows that it is bad to do
implicit choices like that. Let's make it an explicit opt-in.

And that can be used for Mesa for instance if user is interested in some specific
cases that are bursty and latency sensitive, like using Mesa Vulkan for compute stuff ;)

> or is UMD supposed to expose an extention
> or something for the system integrator supposed to selectively modify app code?

Yes, I'd love to have that. One of my long term goals is to convince the high
level APIs that we need extensions. That nobody better than the apps to hint
the low level kernel, firmware and hardware about their power, performance
and latency needs. So we could stop the heuristics and guessing games
underneath!

Thanks,
Rodrigo.

> 
> ...alan

  reply	other threads:[~2025-02-12 16:31 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-12 12:18 [PATCH V9] drm/xe/uapi: Use hint for guc to set GT frequency Tejas Upadhyay
2025-02-12 13:40 ` ✓ CI.Patch_applied: success for drm/xe/uapi: Use hint for guc to set GT frequency (rev7) Patchwork
2025-02-12 13:41 ` ✗ CI.checkpatch: warning " Patchwork
2025-02-12 13:42 ` ✓ CI.KUnit: success " Patchwork
2025-02-12 13:58 ` ✓ CI.Build: " Patchwork
2025-02-12 14:01 ` ✓ CI.Hooks: " Patchwork
2025-02-12 14:02 ` ✓ CI.checksparse: " Patchwork
2025-02-12 15:38 ` [PATCH V9] drm/xe/uapi: Use hint for guc to set GT frequency Teres Alexis, Alan Previn
2025-02-12 16:31   ` Rodrigo Vivi [this message]
2025-02-13  6:06 ` ✓ Xe.CI.BAT: success for drm/xe/uapi: Use hint for guc to set GT frequency (rev7) Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2025-02-12 11:38 [PATCH V9] drm/xe/uapi: Use hint for guc to set GT frequency Tejas Upadhyay
2025-02-24 15:43 ` Lucas De Marchi
2025-02-24 19:11   ` Lucas De Marchi
2025-02-25  4:39     ` Upadhyay, Tejas
2025-02-25 14:48       ` Lucas De Marchi
2025-02-25 14:52         ` Upadhyay, Tejas

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=Z6zMypgRtTKR3-Fg@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=alan.previn.teres.alexis@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=tejas.upadhyay@intel.com \
    --cc=vinay.belgaumkar@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