[PATCH v6 19/20] drm/xe/svm: Implement prefetch support for SVM ranges
Thomas Hellström
thomas.hellstrom at linux.intel.com
Fri May 2 13:42:23 UTC 2025
On Wed, 2025-04-30 at 17:49 +0530, Himal Prasad Ghimiray wrote:
> This commit adds prefetch support for SVM ranges, utilizing the
> existing ioctl vm_bind functionality to achieve this.
>
> v2: rebase
>
> v3:
> - use xa_for_each() instead of manual loop
> - check range is valid and in preferred location before adding to
> xarray
> - Fix naming conventions
> - Fix return condition as -ENODATA instead of -EAGAIN (Matthew
> Brost)
> - Handle sparsely populated cpu vma range (Matthew Brost)
>
> v4:
> - fix end address to find next cpu vma in case of -ENOENT
>
> v5:
> - Move find next vma logic to drm gpusvm layer
> - Avoid mixing declaration and logic
>
> v6:
> - Use new function names
> - Move eviction logic to prefetch_ranges
>
> Cc: Matthew Brost <matthew.brost at intel.com>
> Signed-off-by: Himal Prasad Ghimiray
> <himal.prasad.ghimiray at intel.com>
> ---
> drivers/gpu/drm/xe/xe_pt.c | 58 ++++++++---
> drivers/gpu/drm/xe/xe_vm.c | 197
> +++++++++++++++++++++++++++++++++++--
> 2 files changed, 234 insertions(+), 21 deletions(-)
>
I was thinking a bit around the UAPI, and prefetching foreign device
regions. That doesn't really fit into the current UAPI.
What are your thoughts here. IMO this should align somewhat to what we
do for madvise().
Let's say we want to prefetch into a foreign device memory region
identified by an fd? I figure we could add that later as an extension.
But how does the UMD API for this look? Do we cover current usage with
the existing UAPI syntax?
/Thomas
More information about the Intel-xe
mailing list