mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-30 09:58:55 +08:00
Revert "fix: use condition variables instead of busy waits in worker threads"
This reverts commit 9d1da44e08.
Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
ac296f76ba
commit
bafb847c73
@@ -67,7 +67,7 @@ bool SVMAllocsManager::SvmAllocationCache::insert(size_t size, void *ptr, SvmAll
|
||||
return false;
|
||||
}
|
||||
|
||||
std::unique_lock<std::mutex> lock(this->mtx);
|
||||
std::lock_guard<std::mutex> lock(this->mtx);
|
||||
if (svmData->device ? svmData->device->shouldLimitAllocationsReuse() : memoryManager->shouldLimitAllocationsReuse()) {
|
||||
return false;
|
||||
}
|
||||
@@ -107,12 +107,6 @@ bool SVMAllocsManager::SvmAllocationCache::insert(size_t size, void *ptr, SvmAll
|
||||
.operationType = CacheOperationType::insert,
|
||||
.isSuccess = isSuccess});
|
||||
}
|
||||
|
||||
if (auto usmReuseCleaner = this->memoryManager->peekExecutionEnvironment().unifiedMemoryReuseCleaner.get()) {
|
||||
lock.unlock();
|
||||
usmReuseCleaner->notifySvmAllocationsCacheUpdate();
|
||||
}
|
||||
|
||||
return isSuccess;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user