mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 01:04:57 +08:00
fix: regression caused by tbx fault mngr
Addresses regressions from the reverted merge of the tbx fault manager for host memory. This fixes attempts by the tbx fault manager to protect/unprotect host buffer memory, even if the host ptr was not driver-allocated. In the case of the smoke test that triggered the critical regression, clCreateBuffer was called with the CL_MEM_USE_HOST_PTR flag. The subsequent `mprotect` calls on the provided host ptr then failed. Related-To: NEO-12268 Signed-off-by: Jack Myers <jack.myers@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
6c08454fea
commit
9a14fe2478
@@ -83,9 +83,11 @@ MemoryManager::MemoryManager(ExecutionEnvironment &executionEnvironment) : execu
|
||||
localMemAllocsSize[rootDeviceIndex].store(0u);
|
||||
}
|
||||
|
||||
if (anyLocalMemorySupported) {
|
||||
pageFaultManager = PageFaultManager::create();
|
||||
prefetchManager = PrefetchManager::create();
|
||||
if (anyLocalMemorySupported || debugManager.isTbxMode()) {
|
||||
pageFaultManager = CpuPageFaultManager::create();
|
||||
if (anyLocalMemorySupported) {
|
||||
prefetchManager = PrefetchManager::create();
|
||||
}
|
||||
}
|
||||
|
||||
if (debugManager.flags.EnableMultiStorageResources.get() != -1) {
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace NEO {
|
||||
using SubDeviceIdsVec = StackVec<uint32_t, 4>;
|
||||
|
||||
class MultiGraphicsAllocation;
|
||||
class PageFaultManager;
|
||||
class CpuPageFaultManager;
|
||||
class GfxPartition;
|
||||
struct ImageInfo;
|
||||
struct AllocationData;
|
||||
@@ -192,7 +192,7 @@ class MemoryManager {
|
||||
return deferredDeleter.get();
|
||||
}
|
||||
|
||||
PageFaultManager *getPageFaultManager() const {
|
||||
MOCKABLE_VIRTUAL CpuPageFaultManager *getPageFaultManager() const {
|
||||
return pageFaultManager.get();
|
||||
}
|
||||
|
||||
@@ -413,7 +413,7 @@ class MemoryManager {
|
||||
std::vector<std::unique_ptr<LocalMemoryUsageBankSelector>> internalLocalMemoryUsageBankSelector;
|
||||
std::vector<std::unique_ptr<LocalMemoryUsageBankSelector>> externalLocalMemoryUsageBankSelector;
|
||||
void *reservedMemory = nullptr;
|
||||
std::unique_ptr<PageFaultManager> pageFaultManager;
|
||||
std::unique_ptr<CpuPageFaultManager> pageFaultManager;
|
||||
std::unique_ptr<PrefetchManager> prefetchManager;
|
||||
OSMemory::ReservedCpuAddressRange reservedCpuAddressRange;
|
||||
std::vector<std::unique_ptr<HeapAssigner>> heapAssigners;
|
||||
|
||||
Reference in New Issue
Block a user