Skip to content

RFC Implement vma madvise ioctl

Nirmoy Das intel-xe 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2drm/xe: Expose vma bind-unbind functionsdrivers/gpu/drm/xe/xe_vm.c drivers/gpu/drm/xe/xe_vm.h+27 -280 replies
2/2drm/xe: Implement madvise ioctl for vmadrivers/gpu/drm/xe/Makefile drivers/gpu/drm/xe/xe_device.c drivers/gpu/drm/xe/xe_vma_madvise.c +2 more+269 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Intel-xe] [RFC PATCH 0/2] Implement vma madvise ioctl

Sending this initial RFC patch series for vma madvise ioctl to gether feedback if this the correct way to do that.

I am adding two expected options for userspace to pass

DRM_XE_VMA_MADVISE_WILLNEED:
* Set ttm priority to normal/high(if cap permits)
* Make sure VMAs are in allowed placement and bound.

DRM_XE_VMA_MADVISE_DONTNEED:
* Set ttm priority to low so the BO belong to the vma become early target for eviction.
* Make sure VMAs are not bound.

Questions:
Should this be part of DRM_IOCTL_XE_VM_MADVISE rather than creating new ioctl?

Cc Thomas Hellström <[email protected]>
Cc Joonas Lahtinen <[email protected]>
Cc Matthew Brost <[email protected]>

Nirmoy Das (2):
drm/xe: Expose vma bind-unbind functions
drm/xe: Implement madvise ioctl for vma

 drivers/gpu/drm/xe/Makefile         |   1 +
 drivers/gpu/drm/xe/xe_device.c      |   2 +
 drivers/gpu/drm/xe/xe_vm.c          |  52 +++----
 drivers/gpu/drm/xe/xe_vm.h          |   3 +
 drivers/gpu/drm/xe/xe_vma_madvise.c | 223 ++++++++++++++++++++++++++++
 drivers/gpu/drm/xe/xe_vma_madvise.h |  15 ++
 include/uapi/drm/xe_drm.h           |  28 ++++
 7 files changed, 296 insertions(+), 28 deletions(-)
 create mode 100644 drivers/gpu/drm/xe/xe_vma_madvise.c
 create mode 100644 drivers/gpu/drm/xe/xe_vma_madvise.h
Signature · 1 line
2.39.0