mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-09 22:43:00 +08:00
Revert "fix: regression caused by tbx fault mngr"
This reverts commit 9a14fe2478.
Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
136e5b4f6c
commit
124e755b9d
@@ -8,8 +8,6 @@ set(NEO_CORE_PAGE_FAULT_MANAGER_LINUX
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cpu_page_fault_manager_linux.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cpu_page_fault_manager_linux.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/tbx_page_fault_manager_linux.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/tbx_page_fault_manager_linux.h
|
||||
)
|
||||
|
||||
set_property(GLOBAL PROPERTY NEO_CORE_PAGE_FAULT_MANAGER_LINUX ${NEO_CORE_PAGE_FAULT_MANAGER_LINUX})
|
||||
|
||||
@@ -10,20 +10,15 @@
|
||||
#include "shared/source/debug_settings/debug_settings_manager.h"
|
||||
#include "shared/source/device/device.h"
|
||||
#include "shared/source/execution_environment/root_device_environment.h"
|
||||
#include "shared/source/helpers/debug_helpers.h"
|
||||
#include "shared/source/memory_manager/memory_operations_handler.h"
|
||||
#include "shared/source/page_fault_manager/linux/tbx_page_fault_manager_linux.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <sys/mman.h>
|
||||
|
||||
namespace NEO {
|
||||
std::unique_ptr<CpuPageFaultManager> CpuPageFaultManager::create() {
|
||||
auto pageFaultManager = [&]() -> std::unique_ptr<CpuPageFaultManager> {
|
||||
if (debugManager.isTbxMode()) {
|
||||
return TbxPageFaultManager::create();
|
||||
}
|
||||
return std::make_unique<PageFaultManagerLinux>();
|
||||
}();
|
||||
std::unique_ptr<PageFaultManager> PageFaultManager::create() {
|
||||
auto pageFaultManager = std::make_unique<PageFaultManagerLinux>();
|
||||
|
||||
pageFaultManager->selectGpuDomainHandler();
|
||||
return pageFaultManager;
|
||||
@@ -95,11 +90,6 @@ void PageFaultManagerLinux::protectCPUMemoryAccess(void *ptr, size_t size) {
|
||||
UNRECOVERABLE_IF(retVal != 0);
|
||||
}
|
||||
|
||||
void PageFaultManagerLinux::protectCpuMemoryFromWrites(void *ptr, size_t size) {
|
||||
auto retVal = mprotect(ptr, size, PROT_READ);
|
||||
UNRECOVERABLE_IF(retVal != 0);
|
||||
}
|
||||
|
||||
void PageFaultManagerLinux::callPreviousHandler(int signal, siginfo_t *info, void *context) {
|
||||
handlerIndex++;
|
||||
UNRECOVERABLE_IF(handlerIndex < 0 && handlerIndex >= static_cast<int>(previousPageFaultHandlers.size()));
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include <vector>
|
||||
|
||||
namespace NEO {
|
||||
class PageFaultManagerLinux : public virtual CpuPageFaultManager {
|
||||
class PageFaultManagerLinux : public PageFaultManager {
|
||||
public:
|
||||
PageFaultManagerLinux();
|
||||
~PageFaultManagerLinux() override;
|
||||
@@ -24,7 +24,6 @@ class PageFaultManagerLinux : public virtual CpuPageFaultManager {
|
||||
protected:
|
||||
void allowCPUMemoryAccess(void *ptr, size_t size) override;
|
||||
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;
|
||||
@@ -42,7 +41,4 @@ class PageFaultManagerLinux : public virtual CpuPageFaultManager {
|
||||
bool evictMemoryAfterCopy = false;
|
||||
int handlerIndex = 0;
|
||||
};
|
||||
|
||||
class CpuPageFaultManagerLinux final : public PageFaultManagerLinux {};
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/page_fault_manager/linux/tbx_page_fault_manager_linux.h"
|
||||
|
||||
namespace NEO {
|
||||
std::unique_ptr<TbxPageFaultManager> TbxPageFaultManager::create() {
|
||||
return std::make_unique<TbxPageFaultManagerLinux>();
|
||||
}
|
||||
|
||||
void TbxPageFaultManagerLinux::handlePageFault(void *ptr, PageFaultData &faultData) {
|
||||
TbxPageFaultManager::handlePageFault(ptr, faultData);
|
||||
}
|
||||
} // namespace NEO
|
||||
@@ -1,21 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "shared/source/page_fault_manager/linux/cpu_page_fault_manager_linux.h"
|
||||
#include "shared/source/page_fault_manager/tbx_page_fault_manager.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
class TbxPageFaultManagerLinux final : public TbxPageFaultManager, public PageFaultManagerLinux {
|
||||
public:
|
||||
protected:
|
||||
void handlePageFault(void *ptr, PageFaultData &faultData) override;
|
||||
};
|
||||
|
||||
} // namespace NEO
|
||||
Reference in New Issue
Block a user