Netdev List
 help / color / mirror / Atom feed
From: Aravind Iddamsetty <aravind.iddamsetty@linux.intel.com>
To: "Tauro, Riana" <riana.tauro@intel.com>,
	Rodrigo Vivi <rodrigo.vivi@intel.com>,
	Jakub Kicinski <kuba@kernel.org>
Cc: intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	netdev@vger.kernel.org, amd-gfx@lists.freedesktop.org,
	simona.vetter@ffwll.ch, airlied@gmail.com,
	tejas.upadhyay@intel.com, himal.prasad.ghimiray@intel.com,
	raag.jadav@intel.com, joshua.santosh.ranjan@intel.com,
	ashwin.kumar.kulkarni@intel.com, pratik.bari@intel.com,
	Hawking.Zhang@amd.com, tao.zhou1@amd.com, YiPeng.Chai@amd.com,
	jinzhou.su@amd.com, cesun102@amd.com, lijo.lazar@amd.com,
	alexander.deucher@amd.com, christian.koenig@amd.com
Subject: Re: [PATCH v2 1/2] drm/xe: Expose retired VRAM pages via drm-ras
Date: Fri, 30 Oct 2026 14:07:06 +0530	[thread overview]
Message-ID: <baf11ed8-6a40-495a-ae40-15df5ad50284@linux.intel.com> (raw)
In-Reply-To: <86fb7702-9b70-412c-a8a0-a2d78cb5fae2@intel.com>

Hi Riana,

On 30-10-2026 11:46, Tauro, Riana wrote:
> Hi Aravind/Rodrigo
>
> How about using a generic telemetry node for this series from
> https://lore.kernel.org/dri-devel/20261029203000.1763447-1-zachary.mckevitt@oss.qualcomm.com/T/#t
> instead of a dedicated node for vram-retired-pages?
I don't think the telemetry node is a good fit for retired-resources,
the two solve
fairly different problems:

Telemetry models a fixed, compile-time-known set of named scalar
readings (temperature, voltage, power, ...), each a single s64
value, read/written one field at a time via doit. The dump op only
enumerates the field schema (field id + field-name), it does not
bulk-return values.

A retired VRAM page is a multi-attribute record (address, size,
status), discovered at runtime when a page actually faults. There's
no way to pre-enumerate a fixed "field id" per page the way
QAIC_DEVINFO_* is enumerated at build time, and the count is
unbounded  and grows over the life of the device.

Trying to map retired pages onto telemetry fields would mean either:
(a) registering a field per page per attribute ahead of time, which
isn't possible since addresses aren't known until the fault
happens, or
(b) doing N doit round-trips (one per field) to read back what is
already a single structured dump today.

Our current get-retired-resources dump returns the full list
(address/size/status, plus a leading max-pages summary) in one
cursor-paginated sweep, with the cursor keyed by address so it stays
correct if the list mutates concurrently (pages retiring mid-dump).
Telemetry's dumpit walks a static array with an index cursor, which
doesn't give us that property.

So I'd prefer to keep DRM_RAS_NODE_TYPE_RETIRED_RESOURCES as its own
node type rather than reusing telemetry for it.

Also, RETIRED_RESOURCES is generic node not just limited to VRAM bad pages
that can extended to support a new type of resource.

Thanks,
Aravind. 
>
> Thanks
> Riana
>
> On 19-10-2026 17:26, Rodrigo Vivi wrote:
>> On Fri, Oct 16, 2026 at 03:49:13PM -0700, Jakub Kicinski wrote:
>>> On Wed,  7 Oct 2026 13:33:53 +0530 Aravind Iddamsetty wrote:
>>>> +  -
>>>> +    name: retired-resource-attrs
>>>> +    attributes:
>>>> +      -
>>>> +        name: node-id
>>>> +        type: u32
>>>> +        doc: Node ID targeted by this retired resource operation.
>>>> +      -
>>>> +        name: vram-page
>>>> +        type: nest
>>>> +        nested-attributes: vram-page-attrs
>>> why wrap attrs in a nest? Are you planning to add other resource types
>>> (than a page)? It's a common anti-pattern in Netlink to over-wrap
>>> stuff.
>> we should indeed remove the wrap and have only the page info.
>>
>>>> +        doc: >-
>>>> +             Type-specific payload. The resource type is
>>>> identified by the
>>>> +             node (its node-name); each node reports a single
>>>> resource type.
>>>> +  -
>>>> +    name: vram-page-attrs
>>>> +    attributes:
>>>> +      -
>>>> +        name: address
>>>> +        type: u64
>>>> +        doc: Device address of the retired VRAM page (e.g. DPA).
>>>> +      -
>>>> +        name: size
>>>> +        type: u64
>>> prefer uint
>>>
>>>> +        doc: Size of the retired VRAM page in bytes.
>>>> +      -
>>>> +        name: max-pages
>>>> +        type: u32
>>>> +        doc: >-
>>>> +             Maximum VRAM pages that can be retired. Present only
>>>> in the
>>>> +             leading summary entry of the dump (no
>>>> address/size/status).
>>>> +      -
>>>> +        name: status
>>>> +        type: u32
>>>> +        doc: Retirement status of the retired VRAM page.
>>>> +        enum: retired-resource-status
>>>> +      -
>>>> +        name: pad
>>>> +        type: pad
>>> And then you won't need pad
>> I noticed this in the review prompts, but I have some reservations here.
>> We know for sure our value is always u64 because it is our hw
>> definition.
>> I don't see a good reason why not use the exact size that matches our
>> hw.

  reply	other threads:[~2026-10-30  8:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-07  8:03 [PATCH v2 0/2] drm/xe: Expose retired VRAM pages via drm-ras Aravind Iddamsetty
2026-10-07  8:03 ` [PATCH v2 1/2] " Aravind Iddamsetty
2026-10-07  9:28   ` Christian König
2026-10-07 13:55     ` Rodrigo Vivi
2026-10-14 21:40   ` Rodrigo Vivi
2026-10-16 22:49   ` Jakub Kicinski
2026-10-19 11:56     ` Rodrigo Vivi
2026-10-30  6:16       ` Tauro, Riana
2026-10-30  8:37         ` Aravind Iddamsetty [this message]
2026-10-07  8:03 ` [PATCH v2 2/2] drm/xe: Remove bad VRAM pages debugfs interface Aravind Iddamsetty
2026-10-14 21:41   ` Rodrigo Vivi

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=baf11ed8-6a40-495a-ae40-15df5ad50284@linux.intel.com \
    --to=aravind.iddamsetty@linux.intel.com \
    --cc=Hawking.Zhang@amd.com \
    --cc=YiPeng.Chai@amd.com \
    --cc=airlied@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=ashwin.kumar.kulkarni@intel.com \
    --cc=cesun102@amd.com \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=himal.prasad.ghimiray@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jinzhou.su@amd.com \
    --cc=joshua.santosh.ranjan@intel.com \
    --cc=kuba@kernel.org \
    --cc=lijo.lazar@amd.com \
    --cc=netdev@vger.kernel.org \
    --cc=pratik.bari@intel.com \
    --cc=raag.jadav@intel.com \
    --cc=riana.tauro@intel.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=simona.vetter@ffwll.ch \
    --cc=tao.zhou1@amd.com \
    --cc=tejas.upadhyay@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