libhsakmt: add new flags for svm
PATCH 3/4 libhsakmt: add new flags for svm
It is to add new option for always keeping gpu mapping.
Signed-off-by Eric Huang <[email protected]>
Change-Id Iebee35e6de4d52fa29f82dd19f6bbf5640249492
--- include/linux/kfd_ioctl.h | 2 ++ 1 file changed, 2 insertions(+)
include/linux/kfd_ioctl.h +2 -0
@@ -1069,6 +1069,8 @@ struct kfd_ioctl_cross_memory_copy_args {#define KFD_IOCTL_SVM_FLAG_GPU_EXEC 0x00000010/* GPUs mostly read, may allow similar optimizations as RO, but writes fault */ #define KFD_IOCTL_SVM_FLAG_GPU_READ_MOSTLY 0x00000020 +/* Keep GPU memory mapping always valid as if XNACK is disable */ +#define KFD_IOCTL_SVM_FLAG_GPU_ALWAYS_MAPPED 0x00000040/** * kfd_ioctl_svm_op - SVM ioctl operations
Signature · 1 line
2.25.1
PATCH 4/4 libhsakmt: allocate unified memory for ctx save restore area
To improve performance on queue preemption, allocate ctx s/r
area in VRAM instead of system memory, and migrate it back to system memory when VRAM is full.
Signed-off-by Eric Huang <[email protected]>
Change-Id If775782027188dbe84b6868260e429373675434c
--- include/hsakmttypes.h | 1 + src/queues.c | 109 ++++++++++++++++++++++++++++++++++++------ 2 files changed, 96 insertions(+), 14 deletions(-)
include/hsakmttypes.h +1 -0
@@ -1329,6 +1329,7 @@ typedef enum _HSA_SVM_FLAGS {HSA_SVM_FLAG_GPU_RO =0x00000008 ,// GPUs only read, allows replication HSA_SVM_FLAG_GPU_EXEC =0x00000010 ,// Allow execution on GPU HSA_SVM_FLAG_GPU_READ_MOSTLY =0x00000020 ,// GPUs mostly read, may allow similar optimizations as RO, but writes fault +HSA_SVM_FLAG_GPU_ALWAYS_MAPPED =0x00000040 ,// Keep GPU memory mapping always valid as if XNACK is disable } HSA_SVM_FLAGS; typedef enum _HSA_SVM_ATTR_TYPE {
src/queues.c +95 -14
142 lines not on this page · raw message
Signature · 1 line
2.25.1