mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 09:14:47 +08:00
refactor: remove unused code
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
451e8a3605
commit
a390327ef9
@@ -61,7 +61,6 @@ class CpuPageFaultManager : public NonCopyableClass {
|
||||
MOCKABLE_VIRTUAL void transferToCpu(void *ptr, size_t size, void *cmdQ);
|
||||
|
||||
protected:
|
||||
virtual void evictMemoryAfterImplCopy(GraphicsAllocation *allocation, Device *device) = 0;
|
||||
virtual void allowCPUMemoryEvictionImpl(bool evict, void *ptr, CommandStreamReceiver &csr, OSInterface *osInterface) = 0;
|
||||
|
||||
virtual bool checkFaultHandlerFromPageFaultManager() = 0;
|
||||
|
||||
@@ -34,9 +34,6 @@ std::function<void(int signal, siginfo_t *info, void *context)> PageFaultManager
|
||||
PageFaultManagerLinux::PageFaultManagerLinux() {
|
||||
PageFaultManagerLinux::registerFaultHandler();
|
||||
UNRECOVERABLE_IF(pageFaultHandler == nullptr);
|
||||
|
||||
this->evictMemoryAfterCopy = debugManager.flags.EnableDirectSubmission.get() &&
|
||||
debugManager.flags.USMEvictAfterMigration.get();
|
||||
}
|
||||
|
||||
PageFaultManagerLinux::~PageFaultManagerLinux() {
|
||||
@@ -119,12 +116,6 @@ void PageFaultManagerLinux::callPreviousHandler(int signal, siginfo_t *info, voi
|
||||
handlerIndex--;
|
||||
}
|
||||
|
||||
void PageFaultManagerLinux::evictMemoryAfterImplCopy(GraphicsAllocation *allocation, Device *device) {
|
||||
if (evictMemoryAfterCopy) {
|
||||
device->getRootDeviceEnvironment().memoryOperationsInterface->evict(device, *allocation);
|
||||
}
|
||||
}
|
||||
|
||||
void PageFaultManagerLinux::allowCPUMemoryEvictionImpl(bool evict, void *ptr, CommandStreamReceiver &csr, OSInterface *osInterface) {}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -26,7 +26,6 @@ class PageFaultManagerLinux : public virtual CpuPageFaultManager {
|
||||
void protectCPUMemoryAccess(void *ptr, size_t size) override;
|
||||
void protectCpuMemoryFromWrites(void *ptr, size_t size) override;
|
||||
|
||||
void evictMemoryAfterImplCopy(GraphicsAllocation *allocation, Device *device) override;
|
||||
void allowCPUMemoryEvictionImpl(bool evict, void *ptr, CommandStreamReceiver &csr, OSInterface *osInterface) override;
|
||||
|
||||
bool checkFaultHandlerFromPageFaultManager() override;
|
||||
@@ -39,7 +38,6 @@ class PageFaultManagerLinux : public virtual CpuPageFaultManager {
|
||||
|
||||
std::vector<struct sigaction> previousPageFaultHandlers;
|
||||
|
||||
bool evictMemoryAfterCopy = false;
|
||||
int handlerIndex = 0;
|
||||
};
|
||||
|
||||
|
||||
@@ -79,8 +79,6 @@ void PageFaultManagerWindows::protectCpuMemoryFromWrites(void *ptr, size_t size)
|
||||
UNRECOVERABLE_IF(!retVal);
|
||||
}
|
||||
|
||||
void PageFaultManagerWindows::evictMemoryAfterImplCopy(GraphicsAllocation *allocation, Device *device) {}
|
||||
|
||||
void PageFaultManagerWindows::allowCPUMemoryEvictionImpl(bool evict, void *ptr, CommandStreamReceiver &csr, OSInterface *osInterface) {
|
||||
NEO::SvmAllocationData *allocData = this->memoryData[ptr].unifiedMemoryManager->getSVMAlloc(ptr);
|
||||
UNRECOVERABLE_IF(allocData == nullptr);
|
||||
|
||||
@@ -26,7 +26,6 @@ class PageFaultManagerWindows : public virtual CpuPageFaultManager {
|
||||
void protectCPUMemoryAccess(void *ptr, size_t size) override;
|
||||
void protectCpuMemoryFromWrites(void *ptr, size_t size) override;
|
||||
|
||||
void evictMemoryAfterImplCopy(GraphicsAllocation *allocation, Device *device) override;
|
||||
void allowCPUMemoryEvictionImpl(bool evict, void *ptr, CommandStreamReceiver &csr, OSInterface *osInterface) override;
|
||||
|
||||
bool checkFaultHandlerFromPageFaultManager() override;
|
||||
|
||||
Reference in New Issue
Block a user