Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Raag Jadav <raag.jadav@intel.com>
To: Matt Roper <matthew.d.roper@intel.com>
Cc: lucas.demarchi@intel.com, John.C.Harrison@intel.com,
	rodrigo.vivi@intel.com, andi.shyti@linux.intel.com,
	intel-xe@lists.freedesktop.org, anshuman.gupta@intel.com,
	badal.nilawar@intel.com, riana.tauro@intel.com
Subject: Re: [PATCH v1] drm/xe: Rework throttle ABI
Date: Fri, 25 Oct 2024 22:04:14 +0300	[thread overview]
Message-ID: <Zxvrri2LSkodxC-g@black.fi.intel.com> (raw)
In-Reply-To: <20241025170341.GQ5725@mdroper-desk1.amr.corp.intel.com>

On Fri, Oct 25, 2024 at 10:03:41AM -0700, Matt Roper wrote:
> On Fri, Oct 25, 2024 at 02:52:38PM +0530, Raag Jadav wrote:
> > Current implementation adds multiple sysfs entries for getting GT
> > throttle status and its reasons, which forces the user to read multiple
> > entries for evaluating the result. Since output of each entry is based
> > on the same underlying hardware register and considering the access type
> > of this register is RO/v, the value of this register can change at any
> > given point, even between subsequent sysfs reads. This makes current
> > implementation fundamentally flawed which can produce inconsistent results.
> > 
> > Rework throttle ABI and introduce throttle_status attribute which will
> > provide throttle status through a oneshot register read, making it
> > relatively less error prone. The new ABI will provide throttle reasons
> > in a string based list based on the respective bits which are set in the
> > hardware. Empty output means no bits are set and hence no throttling.
> 
> But the old ABI is already released, and we have platforms with
> force_probe lifted already.  Presumably userspace software is already
> using the existing interface (otherwise it never would have been allowed
> to land upstream), so that means we can't change it in incompatible ways
> anymore; we're locked into supporting the current interface forever on
> these platforms.
> 
> We can change the ABI for _future_ platforms if it makes sense, but it's
> too late to make compatibility-breaking changes for LNL and BMG.

It landed upstream pretty recently AFAICT, atleast in xe.
So maybe worth reconsidering.

> > 
> > $ cat /sys/devices/.../tile0/gt0/freq0/throttle_status
> > prochot
> > thermal
> > ratl
> > thermalert
> > tdc
> > pl4
> > pl1
> > pl2
> > 
> > Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/2810
> 
> I'm not sure what this ticket is about, but it was already closed
> several weeks ago due to no longer reproducing.

I'm sure we all have our "it works on my machine" moment :D

> The ABI change here doesn't seem to be directly related to this ticket.

We can always create new tickets, and that's not the point.
The point is we're stuck with unreliable ABI.

Side note: The logs in the ticket may help connect the dots with commit message.

Raag

  reply	other threads:[~2024-10-25 19:04 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-25  9:22 [PATCH v1] drm/xe: Rework throttle ABI Raag Jadav
2024-10-25 10:30 ` ✓ CI.Patch_applied: success for " Patchwork
2024-10-25 10:30 ` ✗ CI.checkpatch: warning " Patchwork
2024-10-25 10:31 ` ✓ CI.KUnit: success " Patchwork
2024-10-25 10:43 ` ✓ CI.Build: " Patchwork
2024-10-25 10:45 ` ✓ CI.Hooks: " Patchwork
2024-10-25 10:46 ` ✓ CI.checksparse: " Patchwork
2024-10-25 11:24 ` ✓ CI.BAT: " Patchwork
2024-10-25 17:03 ` [PATCH v1] " Matt Roper
2024-10-25 19:04   ` Raag Jadav [this message]
2024-10-25 20:45     ` Matt Roper
2024-10-25 23:07       ` Lucas De Marchi
2024-10-25 23:31         ` Matt Roper
2024-10-26 11:58         ` Raag Jadav
2024-10-28 20:48         ` Rodrigo Vivi
2024-10-25 19:58 ` Dixit, Ashutosh
2024-10-26 23:09 ` ✗ CI.FULL: failure for " Patchwork
2024-10-29 11:28 ` Patchwork

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=Zxvrri2LSkodxC-g@black.fi.intel.com \
    --to=raag.jadav@intel.com \
    --cc=John.C.Harrison@intel.com \
    --cc=andi.shyti@linux.intel.com \
    --cc=anshuman.gupta@intel.com \
    --cc=badal.nilawar@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=lucas.demarchi@intel.com \
    --cc=matthew.d.roper@intel.com \
    --cc=riana.tauro@intel.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