feature: register handler when we migrate to GPU

Created registerFaultHandler() and checkFaultHandlerFromPageFaultManager()
and removed registering sigaction() from the contructor of the
PageFaultManagerLinux class.

Added if statment to check the current pagefault handler is from the
pagefault manager. If not, register the pagefault handler of the current
pagefault manager on linux.

Refactored windows exception vector adding logic to
registerFaultHandler() and call upon the constructor of the
PageFaultManagerWindows, and make
checkFaultHandlerFromPageFaultManager() always return true for windows.

Related-To: NEO-8190
Signed-off-by: Young Jin Yoon <young.jin.yoon@intel.com>
This commit is contained in:
Young Jin Yoon
2023-08-04 01:48:26 +00:00
committed by Compute-Runtime-Automation
parent 68e1f81a83
commit 91deddb69b
10 changed files with 135 additions and 19 deletions

View File

@@ -77,6 +77,9 @@ inline void PageFaultManager::migrateStorageToGpuDomain(void *ptr, PageFaultData
std::chrono::steady_clock::time_point start;
std::chrono::steady_clock::time_point end;
if (this->checkFaultHandlerFromPageFaultManager() == false) {
this->registerFaultHandler();
}
start = std::chrono::steady_clock::now();
this->transferToGpu(ptr, pageFaultData.cmdQ);
end = std::chrono::steady_clock::now();