From: sashiko-bot@kernel.org
To: "Matthew Brost" <matthew.brost@intel.com>
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [PATCH] drm/xe: Keep walking on SVM eviction failure
Date: Tue, 08 Sep 2026 18:55:22 +0000 [thread overview]
Message-ID: <20260908185523.6EC501F00AC4@smtp.kernel.org> (raw)
In-Reply-To: <20260908184346.92332-1-matthew.brost@intel.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Unconditionally masking `xe_svm_bo_evict()` errors as `-ENOSPC` hides fatal errors and triggers TTM error log spam.
--
commit 8fcbc00a7aa0e3b2119f7df96129747882247423
Author: Matthew Brost <matthew.brost@intel.com>
drm/xe: Keep walking on SVM eviction failure
This commit adjusts the error handling in xe_bo_move() for SVM eviction
failures. It overwrites the return code from xe_svm_bo_evict() with -ENOSPC
to force TTM to continue walking the LRU list for eviction candidates.
> diff --git a/drivers/gpu/drm/xe/xe_bo.c b/drivers/gpu/drm/xe/xe_bo.c
> --- a/drivers/gpu/drm/xe/xe_bo.c
> +++ b/drivers/gpu/drm/xe/xe_bo.c
> @@ -1043,6 +1043,11 @@ static int xe_bo_move(struct ttm_buffer_object *ttm_bo, bool evict,
> } else {
> drm_dbg(&xe->drm, "Evict system allocator BO failed=%pe\n",
> ERR_PTR(ret));
> + /*
> + * The semantic we want upon SVM eviction failure is
> + * keep walking for eviction, which is -ENOSPC.
> + */
> + ret = -ENOSPC;
[Severity: Medium]
Does unconditionally overwriting the error with -ENOSPC hide fatal errors like
-ENOMEM?
When system memory is exhausted, xe_svm_bo_evict() can return -ENOMEM. By
masking this as -ENOSPC, it seems we might break proper error propagation to
higher layers, preventing expected OOM handling.
Furthermore, could this trigger a TTM error log spam loop? When returned to
TTM, -ENOSPC causes ttm_bo_evict() to log an unconditional
pr_err("Buffer eviction failed\n"). Since -ENOSPC is converted to -EBUSY in
ttm_bo_evict_cb(), it signals the LRU walker (ttm_lru_walk_for_evict()) to
skip the BO and continue walking.
During genuine resource exhaustion, this might cause a fruitless iteration over
the entire LRU list, logging a pr_err() for every single buffer object. Even
benign SVM races might spam the kernel log with errors.
> }
>
> goto out;
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260908184346.92332-1-matthew.brost@intel.com?part=1
next prev parent reply other threads:[~2026-09-08 18:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-08 18:43 [PATCH] drm/xe: Keep walking on SVM eviction failure Matthew Brost
2026-09-08 18:51 ` ✓ CI.KUnit: success for " Patchwork
2026-09-08 18:55 ` sashiko-bot [this message]
2026-09-08 19:31 ` [PATCH] " Matthew Brost
2026-09-09 7:55 ` Thomas Hellström
2026-09-08 19:37 ` ✓ Xe.CI.BAT: success for " Patchwork
2026-09-09 2:50 ` ✗ 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=20260908185523.6EC501F00AC4@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.brost@intel.com \
--cc=sashiko-reviews@lists.linux.dev \
/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.