From: "Purkait, Soham" <soham.purkait@intel.com>
To: Rodrigo Vivi <rodrigo.vivi@intel.com>,
Andi Shyti <andi.shyti@linux.intel.com>
Cc: <intel-xe@lists.freedesktop.org>, <riana.tauro@intel.com>,
<anshuman.gupta@intel.com>, <aravind.iddamsetty@linux.intel.com>,
<badal.nilawar@intel.com>, <raag.jadav@intel.com>,
<ravi.kishore.koppuravuri@intel.com>,
<mallesh.koujalagi@intel.com>, <anoop.c.vijay@intel.com>
Subject: Re: [PATCH v1 2/2] drm/xe/xe_ras: Add RAS support for GPU health indicator
Date: Wed, 22 Apr 2026 11:35:05 +0530 [thread overview]
Message-ID: <83acf609-2ee8-4f19-8408-d0f7023b6679@intel.com> (raw)
In-Reply-To: <aeaD3n25U8LqGTM8@intel.com>
On 21-04-2026 01:21, Rodrigo Vivi wrote:
> On Mon, Apr 20, 2026 at 05:26:33PM +0200, Andi Shyti wrote:
>> Hi Rodrigo,
>>
>>>>> +static const char * const gpu_health_states[] = { "ok", "warning", "critical" };
>>>>> +static const char * const gpu_health_fmt[] = {
>>>>> + "[%s] %s %s\n",
>>>>> + "%s [%s] %s\n",
>>>>> + "%s %s [%s]\n",
>>>>> +};
>>>> Please, don't use complex sentences in sysfs outputs. Use a
>>>> single string/character/value
>>> I like this one better. So we don't need to have an uAPI entry to define
>>> the meaning of 0, 1, 2.
>>>
>>> Regarding the sysfs rules, as long as it is one entry per sysfs we should
>>> be compliant with the rule. So, we should be good here.
>>>
>>> This style is consistent with the style used in /sys/power/ entries for instance:
>> Well, if it's a sysfs interface, it's a uAPI entry and needs to
>> be documented (something that I don't see in this series, BTW).
> Indeed a good point. Soham, can you please provide a documentation
> in a next revision?
Sure.
Thanks,
Soham
>
>> The sysfs interfaces don't really need to be 1, 2, etc, they can
>> also be strings, as long as userspace applications are able to
>> easily parse the content and know what to expect from them.
> Which is the case here.
> We only have these 3 states that user space can easily parse:
> [ok] warning critical
> ok [warning] critical
> ok warning [critical]
>
>> If we need two strings, then we create two files.
> This part I don't agree. This is just the same as the power cases
> which I already had pointed out.
>
> But right, you do have a point here. Different from power, we don't
> necessarily need to expose all the supported modes + the current one.
> After all, these states won't be that different from state to state.
>
> We just need to document it properly and then just print:
> either
>
> ok
> instead of
> [ok] warning critical
>
> or
> warning
> instead of
> ok [warning] critical
>
> or critical
> instead of
> ok warning [critical]
>
> The full string with all the supported modes do sound bloated for
> this case. Considering that the supported cases themselves shouldn't
> change much and that we keep that documented. My bad, I'm sorry for
> the confusion here.
>
>> If we just need to provide information to system administrators,
>> then we can either use the debugfs or procfs that don't need to
>> be considered as uAPI.
> That is not true. In many data center deployments the 'debugfs'
> is not available and the admin and cluster tools still need this
> information. It needs to be stable API.
>
>> Andi
>>
>>> $ cat /sys/power/mem_sleep
>>> [s2idle] deep
>>>
>>> $ cat /sys/power/state
>>> freeze mem disk
next prev parent reply other threads:[~2026-04-22 6:05 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-16 9:36 [PATCH v1 0/2] drm/xe: Add support for GPU health indicator Soham Purkait
2026-04-16 9:36 ` [PATCH v1 1/2] drm/xe/xe_ras: Add structures and commands for RAS " Soham Purkait
2026-04-16 11:39 ` Andi Shyti
2026-04-17 14:45 ` Rodrigo Vivi
2026-04-16 9:36 ` [PATCH v1 2/2] drm/xe/xe_ras: Add RAS support for " Soham Purkait
2026-04-16 11:54 ` Andi Shyti
2026-04-17 14:51 ` Rodrigo Vivi
2026-04-20 15:26 ` Andi Shyti
2026-04-20 19:51 ` Rodrigo Vivi
2026-04-21 12:56 ` Andi Shyti
2026-04-21 13:21 ` Rodrigo Vivi
2026-04-22 6:05 ` Purkait, Soham [this message]
2026-04-20 16:19 ` Purkait, Soham
2026-04-20 17:35 ` Andi Shyti
2026-04-16 9:55 ` ✗ CI.checkpatch: warning for drm/xe: Add " Patchwork
2026-04-16 9:56 ` ✓ CI.KUnit: success " Patchwork
2026-04-16 10:58 ` ✓ Xe.CI.BAT: " Patchwork
2026-04-16 12:01 ` ✗ Xe.CI.FULL: failure " 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=83acf609-2ee8-4f19-8408-d0f7023b6679@intel.com \
--to=soham.purkait@intel.com \
--cc=andi.shyti@linux.intel.com \
--cc=anoop.c.vijay@intel.com \
--cc=anshuman.gupta@intel.com \
--cc=aravind.iddamsetty@linux.intel.com \
--cc=badal.nilawar@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=mallesh.koujalagi@intel.com \
--cc=raag.jadav@intel.com \
--cc=ravi.kishore.koppuravuri@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