Separate local memory usage tracking for internal and external

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk
2021-07-22 06:36:45 +00:00
committed by Compute-Runtime-Automation
parent 30151a8f02
commit 890eec6105
6 changed files with 54 additions and 12 deletions

View File

@@ -210,6 +210,9 @@ class MemoryManager {
virtual void registerSysMemAlloc(GraphicsAllocation *allocation){};
virtual void registerLocalMemAlloc(GraphicsAllocation *allocation, uint32_t rootDeviceIndex){};
bool isInternalAllocation(GraphicsAllocation::AllocationType allocationType);
LocalMemoryUsageBankSelector *getLocalMemoryUsageBankSelector(GraphicsAllocation::AllocationType allocationType, uint32_t rootDeviceIndex);
bool isLocalMemoryUsedForIsa(uint32_t rootDeviceIndex);
protected:
@@ -258,7 +261,8 @@ class MemoryManager {
uint32_t latestContextId = std::numeric_limits<uint32_t>::max();
std::unique_ptr<DeferredDeleter> multiContextResourceDestructor;
std::vector<std::unique_ptr<GfxPartition>> gfxPartitions;
std::vector<std::unique_ptr<LocalMemoryUsageBankSelector>> localMemoryUsageBankSelector;
std::vector<std::unique_ptr<LocalMemoryUsageBankSelector>> internalLocalMemoryUsageBankSelector;
std::vector<std::unique_ptr<LocalMemoryUsageBankSelector>> externalLocalMemoryUsageBankSelector;
void *reservedMemory = nullptr;
std::unique_ptr<PageFaultManager> pageFaultManager;
OSMemory::ReservedCpuAddressRange reservedCpuAddressRange;