performance: lazy start usm reuse cleaner thread

Delay starting usm reuse cleaner thread to first allocation reuse.

Related-To: HSD-16028754950

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
This commit is contained in:
Dominik Dabek
2025-10-07 12:19:24 +00:00
committed by Compute-Runtime-Automation
parent 4fe7f9e534
commit 17199556ca
6 changed files with 50 additions and 2 deletions

View File

@@ -99,6 +99,9 @@ bool SVMAllocsManager::SvmAllocationCache::insert(size_t size, void *ptr, SvmAll
}
svmData->isSavedForReuse = true;
allocations.emplace(std::lower_bound(allocations.begin(), allocations.end(), size), size, ptr, svmData, waitForCompletion);
if (memoryManager->peekExecutionEnvironment().unifiedMemoryReuseCleaner) {
memoryManager->peekExecutionEnvironment().unifiedMemoryReuseCleaner->startThread();
}
}
if (enablePerformanceLogging) {
logCacheOperation({.allocationSize = size,