From: Matthew Auld <matthew.auld@intel.com>
To: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
intel-xe@lists.freedesktop.org
Cc: Satyanarayana K V P <satyanarayana.k.v.p@intel.com>,
Matthew Brost <matthew.brost@intel.com>,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
stable@vger.kernel.org, Natalie Vock <nat@pixelcluster.dev>,
Arun Pravin <arunpravin.paneerselvam@amd.com>,
DRI-devel <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH v3 1/3] drm/xe: Undo pinned BO eviction on suspend failure
Date: Fri, 4 Dec 2026 11:36:13 +0000 [thread overview]
Message-ID: <a3acd96f-c79a-44eb-9a0c-d179ee09b9b5@intel.com> (raw)
In-Reply-To: <20261203104715.270111-2-thomas.hellstrom@linux.intel.com>
On 03/12/2026 10:47, Thomas Hellström wrote:
> Pinned VRAM BOs are evicted at suspend by copying their contents to a
> backup object, while the BOs themselves remain in VRAM. Pinned kernel
> BOs are additionally moved to the evicted lists.
>
> If suspend fails after some or all pinned BOs have been evicted, either
> in xe_bo_evict_all() itself, for example due to -ENOMEM when allocating
> a backup object, or in a later suspend step, nothing undoes this, and
> the device continues operating with the stale backups. That causes:
>
> - A subsequent suspend skipping the BOs on the evicted lists, and the
> following resume overwriting their VRAM contents with stale data.
> - The backup objects of pinned external BOs being leaked through a
> reference cycle when the BOs are later unpinned.
> - A subsequent PM notifier prepare step hitting the
> xe_assert(xe, !bo->backup_obj) in xe_bo_notifier_prepare_pinned().
>
> This has been an issue since the initial driver. Before commit
> 86f69c26113c ("drm/xe: use backup object for pinned save/restore"),
> pinned BOs were instead moved out of VRAM, and with a failed suspend,
> the GuC would continue to access the freed VRAM through the GGTT while
> the CPU would access the moved copy. This patch only addresses the
> backup object scheme.
>
> Add xe_bo_evict_all_undo() that drops the backup objects created by the
> eviction and moves the pinned kernel BOs back to the present lists, and
> call it on failure in xe_bo_evict_all() and on failures after
> xe_bo_evict_all() in the system- and runtime suspend paths. Backup
> objects pre-allocated by the PM notifier are kept and released as
> usual by the notifier.
>
> v3:
> - Rebase onto latest drm-tip
>
> Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
> Fixes: 86f69c26113c ("drm/xe: use backup object for pinned save/restore")
> Cc: Matthew Auld <matthew.auld@intel.com>
> Cc: Satyanarayana K V P <satyanarayana.k.v.p@intel.com>
> Cc: Matthew Brost <matthew.brost@intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Cc: intel-xe@lists.freedesktop.org
> Cc: <stable@vger.kernel.org> # v6.16+
> Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
next prev parent reply other threads:[~2026-12-04 11:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-03 10:47 [PATCH v3 0/3] drm/ttm, drm/xe: Handle VRAM eviction failure at suspend Thomas Hellström
2026-12-03 10:47 ` [PATCH v3 1/3] drm/xe: Undo pinned BO eviction on suspend failure Thomas Hellström
2026-12-04 11:36 ` Matthew Auld [this message]
2026-12-03 10:47 ` [PATCH v3 2/3] drm/xe: Don't fail runtime suspend permanently on VRAM eviction -ENOMEM Thomas Hellström
2026-12-03 10:47 ` [PATCH v3 3/3] drm/ttm, drm/xe: Don't invoke the OOM killer when evicting VRAM at suspend Thomas Hellström
2026-12-03 11:31 ` ✓ CI.KUnit: success for drm/ttm, drm/xe: Handle VRAM eviction failure at suspend (rev2) Patchwork
2026-12-03 12:03 ` ✓ Xe.CI.BAT: " Patchwork
2026-12-04 10:15 ` ✗ 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=a3acd96f-c79a-44eb-9a0c-d179ee09b9b5@intel.com \
--to=matthew.auld@intel.com \
--cc=arunpravin.paneerselvam@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.brost@intel.com \
--cc=nat@pixelcluster.dev \
--cc=rodrigo.vivi@intel.com \
--cc=satyanarayana.k.v.p@intel.com \
--cc=stable@vger.kernel.org \
--cc=thomas.hellstrom@linux.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.