From: "Ghimiray, Himal Prasad" <himal.prasad.ghimiray@intel.com>
To: Matthew Brost <matthew.brost@intel.com>,
<intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH] drm/xe: Handle mixed mappings and existing VRAM on atomic faults
Date: Fri, 10 Oct 2025 14:18:09 +0530 [thread overview]
Message-ID: <c2b23ba7-5c46-4ff3-b9fc-121d2558f131@intel.com> (raw)
In-Reply-To: <20251009130629.3531962-1-matthew.brost@intel.com>
On 09-10-2025 18:36, Matthew Brost wrote:
> Moving to VRAM will fail if mixed mappings are present or if the page is
> already located in VRAM. Atomic faults that require a move to VRAM
> currently retry without attempting to evict mixed mappings or locate
> existing VRAM mappings.
>
> This patch fixes the issue by attempting to evict mixed mappings or find
> existing VRAM pages when a move to VRAM fails during atomic fault
> handling.
>
> Fixes: a9ac0fa455b0 ("drm/xe: Strict migration policy for atomic SVM faults")
> Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>> ---
> drivers/gpu/drm/xe/xe_svm.c | 13 ++++++++++++-
> 1 file changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_svm.c b/drivers/gpu/drm/xe/xe_svm.c
> index 7e2db71ff34e..b268ee0d2271 100644
> --- a/drivers/gpu/drm/xe/xe_svm.c
> +++ b/drivers/gpu/drm/xe/xe_svm.c
> @@ -1073,7 +1073,17 @@ static int __xe_svm_handle_pagefault(struct xe_vm *vm, struct xe_vma *vma,
> drm_dbg(&vm->xe->drm,
> "VRAM allocation failed, falling back to retrying fault, asid=%u, errno=%pe\n",
> vm->usm.asid, ERR_PTR(err));
> - goto retry;
> +
> + /*
> + * In the devmem-only case, mixed mappings may
> + * be found. The get_pages function will fix
> + * these up to a single location, allowing the
> + * page fault handler to make forward progress.
> + */
> + if (ctx.devmem_only)
> + goto get_pages;
> + else
> + goto retry;
> } else {
> drm_err(&vm->xe->drm,
> "VRAM allocation failed, retry count exceeded, asid=%u, errno=%pe\n",
> @@ -1083,6 +1093,7 @@ static int __xe_svm_handle_pagefault(struct xe_vm *vm, struct xe_vma *vma,
> }
> }
>
> +get_pages:
> get_pages_start = xe_svm_stats_ktime_get();
>
> range_debug(range, "GET PAGES");
prev parent reply other threads:[~2025-10-10 8:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-09 13:06 [PATCH] drm/xe: Handle mixed mappings and existing VRAM on atomic faults Matthew Brost
2025-10-09 13:58 ` ✓ CI.KUnit: success for " Patchwork
2025-10-09 14:46 ` ✓ Xe.CI.BAT: " Patchwork
2025-10-09 20:27 ` ✗ Xe.CI.Full: failure " Patchwork
2025-10-10 8:48 ` Ghimiray, Himal Prasad [this message]
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=c2b23ba7-5c46-4ff3-b9fc-121d2558f131@intel.com \
--to=himal.prasad.ghimiray@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.brost@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