fmm.c: Disable userptr for paged mem by default

Unless HSA_USERPTR_FOR_PAGED_MEM is explicitly set, don't use userptr
for all paged memory. This will also allow us to work around some 4.9
issues, and then we can explicitly set HSA_USERPTR_FOR_PAGED_MEM for
all usage once those issues are resolved.

Change-Id: I25ce22b73ae6e93f1567f2318d9d2b47d4a44e69
Этот коммит содержится в:
Kent Russell
2017-02-28 12:36:30 -05:00
родитель 116e5c5e8b
Коммит c991951288
+2 -2
Просмотреть файл
@@ -1400,10 +1400,10 @@ HSAKMT_STATUS fmm_init_process_apertures(unsigned int NumNodes)
if (disableCache && strcmp(disableCache, "0") == 0)
disableCache = NULL;
/* If HSA_USERPTR_FOR_PAGED_MEM unset or set to a non-0 value,
/* If HSA_USERPTR_FOR_PAGED_MEM is 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"));
/* Trade off - NumNodes includes GPU nodes + CPU Node. So in
* systems with CPU node, slightly more memory is allocated than