[PATCH v1] drm/xe: Rework throttle ABI

Dixit, Ashutosh ashutosh.dixit at intel.com
Fri Oct 25 19:58:45 UTC 2024


On Fri, 25 Oct 2024 02:22:38 -0700, 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.
>
> $ cat /sys/devices/.../tile0/gt0/freq0/throttle_status
> prochot
> thermal
> ratl
> thermalert
> tdc
> pl4
> pl1
> pl2

Agree this seems to be a much better way of doing this, so I'd be open to
changing the ABI while we can :-) Not sure if there are any IGT's which use
the current ABI though. Are there any real applications using the old ABI?

Note that the top 16 bits are "latched" values of the conditions in the
lower 16 bits, so maybe we can add those too in throttle_status?

Ashutosh


More information about the Intel-xe mailing list