From: sashiko-bot@kernel.org
To: "Tejas Upadhyay" <tejas.upadhyay@intel.com>
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [PATCH V17 09/12] drm/xe/configfs: Add vram bad page reservation policy
Date: Tue, 18 Aug 2026 10:57:13 +0000 [thread overview]
Message-ID: <20260818105713.C5D101F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260818104055.3833974-23-tejas.upadhyay@intel.com>
Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [Medium] Dynamic configfs lookup at runtime causes state loss if the directory is removed.
- [Medium] Silent hardware corruption offlining under default policy (skips logging).
- [Low] Redundant `#include "xe_configfs.h"` directive.
--
--- Patch [9]: [PATCH V17 09/12] drm/xe/configfs: Add vram bad page reservation policy ---
commit ce0caab1275a7dd6bc0fdd6afde67d346ea6c808
Author: Tejas Upadhyay <tejas.upadhyay@intel.com>
drm/xe/configfs: Add vram bad page reservation policy
The interface enables setting the policy for how bad pages are
handled in VRAM. This is crucial for maintaining system
stability in scenarios where VRAM degradation occurs.
> diff --git a/drivers/gpu/drm/xe/xe_ttm_vram_mgr.c b/drivers/gpu/drm/xe/xe_ttm_vram_mgr.c
> index 9311aa3728f84..51b98460481d9 100644
> --- a/drivers/gpu/drm/xe/xe_ttm_vram_mgr.c
> +++ b/drivers/gpu/drm/xe/xe_ttm_vram_mgr.c
> @@ -15,6 +15,8 @@
> #include "regs/xe_regs.h"
> #include "xe_bo.h"
> #include "xe_configfs.h"
> +#include "xe_configfs.h"
[Severity: Low]
This isn't a bug, but is it intentional to include xe_configfs.h twice
on consecutive lines here?
> #include "xe_device.h"
> #include "xe_exec_queue.h"
[ ... ]
> @@ -860,6 +862,14 @@ int xe_ttm_vram_handle_addr_fault(struct xe_device *xe, u64 addr)
> vram_mgr = &vr->ttm;
> mm = &vram_mgr->mm;
>
> + policy = xe_configfs_get_bad_page_reservation(to_pci_dev(xe->drm.dev));
[Severity: Medium]
Is it safe to dynamically query the configfs tree during the hardware fault
handler?
If userspace removes the configfs directory via rmdir,
xe_configfs_get_bad_page_reservation() will fail to find the group and
silently revert to the default policy.
Since the attribute can only be set before binding, would it be more
robust to cache this value in struct xe_device at probe time rather than
evaluating it dynamically at runtime?
> + if (!policy) {
> + drm_err(&xe->drm, "0x%llx is reported as corrupted address by HW\n",
> + addr);
> + /* Let RAS report to FW to drop addr from SRAM queue */
> + return -EOPNOTSUPP;
> + }
[Severity: Medium]
Does this skip logging when the policy is set to offlining?
The commit message states that policy 1 means "Logging and offlining"
and 0 means "Logging only". However, the error logging is placed inside
the if (!policy) block. If policy is 1 (the default), the handler bypasses
this block and proceeds to reserve the page without logging the
degradation in dmesg.
> +
> /* Reserve page at address */
> return xe_ttm_vram_reserve_page_at_addr(xe, addr - vr->dpa_base, vram_mgr, mm);
> }
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260818104055.3833974-14-tejas.upadhyay@intel.com?part=9
next prev parent reply other threads:[~2026-08-18 10:57 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-18 10:40 [PATCH V17 00/12] Add memory page offlining support Tejas Upadhyay
2026-08-18 10:40 ` [PATCH V17 01/12] drm/xe: Link VRAM object with gpu buddy Tejas Upadhyay
2026-08-18 10:40 ` [PATCH V17 02/12] drm/xe: Link LRC BO and its execution Queue Tejas Upadhyay
2026-08-18 10:40 ` [PATCH V17 03/12] drm/xe: Extend BO purge to handle vram pages as well Tejas Upadhyay
2026-08-18 10:40 ` [PATCH V17 04/12] drm/xe/bo: Make xe_bo_is_user() public Tejas Upadhyay
2026-08-18 10:41 ` [PATCH V17 05/12] drm/xe: Guard teardown paths against purged BOs Tejas Upadhyay
2026-08-18 11:06 ` sashiko-bot
2026-08-18 10:41 ` [PATCH V17 06/12] drm/xe/vram: Extract buddy alloc and free helpers Tejas Upadhyay
2026-08-18 10:41 ` [PATCH V17 07/12] drm/xe/vram: Add page offline data structures and lifecycle Tejas Upadhyay
2026-08-18 10:51 ` sashiko-bot
2026-08-18 10:41 ` [PATCH V17 08/12] drm/xe/vram: Add VRAM page offline fault handler Tejas Upadhyay
2026-08-18 11:01 ` sashiko-bot
2026-08-18 10:41 ` [PATCH V17 09/12] drm/xe/configfs: Add vram bad page reservation policy Tejas Upadhyay
2026-08-18 10:57 ` sashiko-bot [this message]
2026-08-18 10:41 ` [PATCH V17 10/12] drm/xe: Add sysfs interface for bad gpu vram pages Tejas Upadhyay
2026-08-18 10:54 ` sashiko-bot
2026-08-18 10:41 ` [PATCH V17 11/12] drm/xe/uapi: Expose ban reason in EXEC_QUEUE_GET_PROPERTY_BAN Tejas Upadhyay
2026-08-18 10:58 ` sashiko-bot
2026-08-18 10:41 ` [PATCH V17 12/12] drm/xe: Add fault-inject based VRAM page offline injection Tejas Upadhyay
2026-08-18 10:55 ` sashiko-bot
2026-08-18 10:49 ` ✓ CI.KUnit: success for Add memory page offlining support (rev19) Patchwork
2026-08-18 11:47 ` ✓ CI.KUnit: success for Add memory page offlining support (rev20) Patchwork
2026-08-18 12:28 ` ✗ Xe.CI.BAT: failure " Patchwork
2026-08-18 12:59 ` [PATCH V17 00/12] Add memory page offlining support Rodrigo Vivi
2026-08-18 13:24 ` Upadhyay, Tejas
2026-08-18 13:12 ` ✗ Xe.CI.FULL: failure for Add memory page offlining support (rev20) 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=20260818105713.C5D101F00A3A@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=sashiko-reviews@lists.linux.dev \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.