[PATCH v4 15/20] drm/xe/uapi: Add flag for consulting madvise hints on svm prefetch
Matthew Brost
matthew.brost at intel.com
Mon Jun 23 16:36:36 UTC 2025
On Fri, Jun 13, 2025 at 06:25:53PM +0530, Himal Prasad Ghimiray wrote:
> Introduce flag DRM_XE_CONSULT_MEM_ADVISE_PREF_LOC to ensure prefetching
> in madvise-advised memory regions
>
> v2 (Matthew Brost)
> - Add kernel-doc
>
> v3 (Matthew Brost)
> - Fix kernel-doc
>
> Cc: Matthew Brost <matthew.brost at intel.com>
Reviewed-by: Matthew Brost <matthew.brost at intel.com>
> Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray at intel.com>
> ---
> include/uapi/drm/xe_drm.h | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/include/uapi/drm/xe_drm.h b/include/uapi/drm/xe_drm.h
> index b5f8d11faaa8..81e90270313d 100644
> --- a/include/uapi/drm/xe_drm.h
> +++ b/include/uapi/drm/xe_drm.h
> @@ -1006,6 +1006,10 @@ struct drm_xe_vm_destroy {
> * valid on VMs with DRM_XE_VM_CREATE_FLAG_FAULT_MODE set. The CPU address
> * mirror flag are only valid for DRM_XE_VM_BIND_OP_MAP operations, the BO
> * handle MBZ, and the BO offset MBZ.
> + *
> + * The @prefetch_mem_region_instance for %DRM_XE_VM_BIND_OP_PREFETCH can also be:
> + * - %DRM_XE_CONSULT_MEM_ADVISE_PREF_LOC, which ensures prefetching occurs in
> + * the memory region advised by madvise.
> */
> struct drm_xe_vm_bind_op {
> /** @extensions: Pointer to the first extension struct, if any */
> @@ -1111,6 +1115,7 @@ struct drm_xe_vm_bind_op {
> /** @flags: Bind flags */
> __u32 flags;
>
> +#define DRM_XE_CONSULT_MEM_ADVISE_PREF_LOC -1
> /**
> * @prefetch_mem_region_instance: Memory region to prefetch VMA to.
> * It is a region instance, not a mask.
> --
> 2.34.1
>
More information about the Intel-xe
mailing list