[PATCH v3 15/19] drm/xe/uapi: Add flag for consulting madvise hints on svm prefetch

Matthew Brost matthew.brost at intel.com
Wed May 28 16:29:18 UTC 2025


On Tue, May 27, 2025 at 10:09:59PM +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
> 
> Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray at intel.com>
> ---
>  include/uapi/drm/xe_drm.h | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/include/uapi/drm/xe_drm.h b/include/uapi/drm/xe_drm.h
> index e0d75226a724..03adfdc20dde 100644
> --- a/include/uapi/drm/xe_drm.h
> +++ b/include/uapi/drm/xe_drm.h
> @@ -1111,6 +1111,10 @@ struct drm_xe_vm_bind_op {
>  	/** @flags: Bind flags */
>  	__u32 flags;
>  
> +	/** DRM_XE_CONSULT_MEM_ADVISE_PREF_LOC as prefetch_mem_region_instance
> +	 * ensures prefetching in madvise-advised memory region.
> +	 */
> +#define DRM_XE_CONSULT_MEM_ADVISE_PREF_LOC	-1

I think the prefered way is to put this 'struct drm_xe_vm_bind_op' based
on existing style.

Matt 

>  	/**
>  	 * @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