All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-xe] [RFC PATCH 0/2] Implement vma madvise ioctl
@ 2023-05-24 12:36 Nirmoy Das
  2023-05-24 12:36 ` [Intel-xe] [RFC PATCH 1/2] drm/xe: Expose vma bind-unbind functions Nirmoy Das
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: Nirmoy Das @ 2023-05-24 12:36 UTC (permalink / raw)
  To: intel-xe; +Cc: Joonas Lahtinen, Nirmoy Das

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 <thomas.hellstrom@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Matthew Brost <matthew.brost@intel.com> 

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

-- 
2.39.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2023-05-30 15:43 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-24 12:36 [Intel-xe] [RFC PATCH 0/2] Implement vma madvise ioctl Nirmoy Das
2023-05-24 12:36 ` [Intel-xe] [RFC PATCH 1/2] drm/xe: Expose vma bind-unbind functions Nirmoy Das
2023-05-24 12:36 ` [Intel-xe] [RFC PATCH 2/2] drm/xe: Implement madvise ioctl for vma Nirmoy Das
2023-05-24 12:39 ` [Intel-xe] ✓ CI.Patch_applied: success for Implement vma madvise ioctl Patchwork
2023-05-24 12:41 ` [Intel-xe] ✓ CI.KUnit: " Patchwork
2023-05-24 12:45 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-05-24 18:30 ` [Intel-xe] [RFC PATCH 0/2] " Matthew Brost
2023-05-24 20:12   ` Nirmoy Das
2023-05-30 13:19     ` Thomas Hellström
2023-05-30 15:12       ` Thomas Hellström
2023-05-30 15:18       ` Nirmoy Das
2023-05-30 15:37         ` Thomas Hellström
2023-05-30 15:42           ` Nirmoy Das

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.