Avoid COW after fork for API-allocated system memory
Change-Id: I5c7175114c4e6411d3beb5557e16cb71ddb01189
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
[ROCm/ROCR-Runtime commit: 64104fc8d9]
Этот коммит содержится в:
коммит произвёл
Kent Russell
родитель
3bafcdb328
Коммит
c28c344f78
@@ -1139,6 +1139,11 @@ static void* fmm_allocate_host_gpu(uint32_t node_id, uint64_t MemorySizeInBytes,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Mappings in the DGPU aperture don't need to be copied on
|
||||
* fork. This avoids MMU notifiers and evictions due to user
|
||||
* memory mappings on fork. */
|
||||
madvise(mem, MemorySizeInBytes, MADV_DONTFORK);
|
||||
|
||||
/* Create userptr BO */
|
||||
mmap_offset = (uint64_t)mem;
|
||||
ioc_flags |= KFD_IOC_ALLOC_MEM_FLAGS_USERPTR;
|
||||
|
||||
Ссылка в новой задаче
Block a user