libhsakmt: Enable HSA_USERPTR_FOR_PAGED_MEM by default

By using user-allocated pages instead of kernel-allocated pages
from TTM, we're not subject to TTM's self imposed limits on kernel
memory usage. This also paves the way for for more wide-spread use
of HMM on upstream kernels.

Change-Id: Iac82964c98a441e29b7f1986d1be1bb5ccb1e569
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>


[ROCm/ROCR-Runtime commit: 626957a263]
This commit is contained in:
Felix Kuehling
2019-04-16 23:31:28 -04:00
committed by Philip Yang
parent 45f337b472
commit 0c86767cf2
+3 -3
View File
@@ -2093,11 +2093,11 @@ HSAKMT_STATUS fmm_init_process_apertures(unsigned int NumNodes)
disableCache = getenv("HSA_DISABLE_CACHE");
svm.disable_cache = (disableCache && strcmp(disableCache, "0"));
/* If HSA_USERPTR_FOR_PAGED_MEM is set to a non-0 value,
* enable userptr for all paged memory allocations
/* If HSA_USERPTR_FOR_PAGED_MEM is not set or set to a non-0
* value, enable userptr for all paged memory allocations
*/
pagedUserptr = getenv("HSA_USERPTR_FOR_PAGED_MEM");
svm.userptr_for_paged_mem = (pagedUserptr && strcmp(pagedUserptr, "0"));
svm.userptr_for_paged_mem = (!pagedUserptr || strcmp(pagedUserptr, "0"));
/* If HSA_CHECK_USERPTR is set to a non-0 value, check all userptrs
* when they are registered