From: sashiko-bot@kernel.org
To: "Himal Prasad Ghimiray" <himal.prasad.ghimiray@intel.com>
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v2 3/4] drm/xe: Bump prefetch BO LRU via GPUSVM devmem callback
Date: Mon, 21 Sep 2026 10:08:19 +0000 [thread overview]
Message-ID: <20260921100820.0C69E1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260921093651.2995928-9-himal.prasad.ghimiray@intel.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] xe: build failure in xe_svm_devmem_lru_bump when PAGEMAP is disabled
--
commit 940efd09f1bf622d948db6a47af2bd9f2667fa6e
Author: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
drm/xe: Bump prefetch BO LRU via GPUSVM devmem callback
This patch adds xe_svm_devmem_lru_bump() and uses it as a devmem callback
in the prefetch worker. This allows each backing BO to be moved to the
LRU tail during get_pages.
> diff --git a/drivers/gpu/drm/xe/xe_svm.c b/drivers/gpu/drm/xe/xe_svm.c
> index f39e647512ad9..56c82ff9b39ef 100644
> --- a/drivers/gpu/drm/xe/xe_svm.c
> +++ b/drivers/gpu/drm/xe/xe_svm.c
[ ... ]
> @@ -1625,6 +1626,33 @@ int xe_svm_range_get_pages(struct xe_vm *vm, struct xe_svm_range *range,
> return err;
> }
>
> +/**
> + * xe_svm_devmem_lru_bump() - Move a range's backing BO to the TTM LRU tail
> + * @devmem_allocation: The device-memory allocation backing the range's pages
> + *
> + * Intended as a &drm_gpusvm_ctx.devmem_fn. Runs under the GPUSVM notifier lock;
> + * the dma-resv trylock avoids inverting against eviction/shrinker, which take
> + * dma-resv before the notifier lock. A contended BO is simply skipped.
> + *
> + * A shared device_private_page_owner can hand us allocations backed by a
> + * foreign driver; skip anything that is not an xe BO before casting.
> + */
> +void xe_svm_devmem_lru_bump(struct drm_pagemap_devmem *devmem_allocation)
> +{
> + struct xe_bo *bo;
> +
> + if (devmem_allocation->ops != &dpagemap_devmem_ops)
[Severity: Low]
Does this cause a static build failure when CONFIG_DRM_XE_PAGEMAP is
disabled?
The function xe_svm_devmem_lru_bump() is compiled unconditionally here,
but it references dpagemap_devmem_ops and calls to_xe_bo(). Since both of
these are omitted when CONFIG_DRM_XE_PAGEMAP is disabled, this will halt
the compiler with undeclared identifier errors in configurations where
CONFIG_DRM_XE_GPUSVM=y but CONFIG_DRM_XE_PAGEMAP=n.
> + return;
> +
> + bo = to_xe_bo(devmem_allocation);
> +
> + if (!dma_resv_trylock(bo->ttm.base.resv))
> + return;
> +
> + ttm_bo_move_to_lru_tail_unlocked(&bo->ttm);
> + dma_resv_unlock(bo->ttm.base.resv);
> +}
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260921093651.2995928-6-himal.prasad.ghimiray@intel.com?part=3
next prev parent reply other threads:[~2026-09-21 10:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-21 9:36 [PATCH v2 0/4] Refresh TTM LRU on SVM prefetch Himal Prasad Ghimiray
2026-09-21 9:36 ` [PATCH v2 1/4] drm/pagemap: Add helper to access backing devmem allocation Himal Prasad Ghimiray
2026-09-21 9:36 ` [PATCH v2 2/4] drm/gpusvm: Add devmem callback to get_pages Himal Prasad Ghimiray
2026-09-21 9:36 ` [PATCH v2 3/4] drm/xe: Bump prefetch BO LRU via GPUSVM devmem callback Himal Prasad Ghimiray
2026-09-21 10:08 ` sashiko-bot [this message]
2026-09-21 9:36 ` [PATCH v2 4/4] drm/xe: Bump prefetch BO LRU for already-valid ranges Himal Prasad Ghimiray
2026-09-21 10:35 ` ✓ CI.KUnit: success for Refresh TTM LRU on SVM prefetch (rev2) Patchwork
2026-09-21 11:47 ` ✗ Xe.CI.BAT: failure " Patchwork
2026-09-22 4:31 ` Ghimiray, Himal Prasad
2026-09-21 14:46 ` ✗ Xe.CI.FULL: " 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=20260921100820.0C69E1F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=himal.prasad.ghimiray@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox