mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-07 21:27:04 +08:00
Revert "performance: enable low latency hint on Xe"
This reverts commit b74dc9b7e1.
Signed-off-by: Szymon Morek <szymon.morek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
2efa5cb907
commit
48b4a33645
@@ -431,7 +431,6 @@ DECLARE_DEBUG_VARIABLE(int32_t, ForcePostSyncL1Flush, -1, "-1: default (do nothi
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, AllowNotZeroForCompressedOnWddm, -1, "-1: default (do nothing), 0: do not set AllowNotZeroed for compressed resources, 1: set AllowNotZeroed for compressed resources");
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, ForceWddmHugeChunkSizeMB, -1, "-1: default (do nothing), >0: set given huge chunk size in MegaBytes for WDDM");
|
||||
DECLARE_DEBUG_VARIABLE(int64_t, ForceGmmSystemMemoryBufferForAllocations, 0, "0: default, >0: (bitmask) for given Allocation Types, force GMM_RESOURCE_USAGE_OCL_SYSTEM_MEMORY_BUFFER gmm resource type");
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, ForceLowLatencyHint, -1, "Force passing low latency hint during xe_exec_queue creation. -1: default, 0: disabled, 1: enabled");
|
||||
|
||||
/*DIRECT SUBMISSION FLAGS*/
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, EnableDirectSubmission, -1, "-1: default (disabled), 0: disable, 1:enable. Enables direct submission of command buffers bypassing KMD")
|
||||
|
||||
@@ -211,17 +211,8 @@ bool IoctlHelperXe::initialize() {
|
||||
|
||||
xeLog("DRM_XE_QUERY_CONFIG_MAX_EXEC_QUEUE_PRIORITY\t\t%#llx\n",
|
||||
config->info[DRM_XE_QUERY_CONFIG_MAX_EXEC_QUEUE_PRIORITY]);
|
||||
xeLog(" DRM_XE_QUERY_CONFIG_FLAG_HAS_LOW_LATENCY\t%s\n",
|
||||
config->info[DRM_XE_QUERY_CONFIG_FLAGS] &
|
||||
DRM_XE_QUERY_CONFIG_FLAG_HAS_LOW_LATENCY
|
||||
? "ON"
|
||||
: "OFF");
|
||||
|
||||
maxExecQueuePriority = config->info[DRM_XE_QUERY_CONFIG_MAX_EXEC_QUEUE_PRIORITY] & 0xffff;
|
||||
isLowLatencyHintAvailable = config->info[DRM_XE_QUERY_CONFIG_FLAGS] & DRM_XE_QUERY_CONFIG_FLAG_HAS_LOW_LATENCY;
|
||||
if (debugManager.flags.ForceLowLatencyHint.get() != -1) {
|
||||
isLowLatencyHintAvailable = !!debugManager.flags.ForceLowLatencyHint.get();
|
||||
}
|
||||
|
||||
memset(&queryConfig, 0, sizeof(queryConfig));
|
||||
queryConfig.query = DRM_XE_DEVICE_QUERY_HWCONFIG;
|
||||
@@ -1382,12 +1373,6 @@ void IoctlHelperXe::xeShowBindTable() {
|
||||
}
|
||||
}
|
||||
|
||||
void IoctlHelperXe::applyContextFlags(void *execQueueCreate, bool allocateInterrupt) {
|
||||
if (this->isLowLatencyHintAvailable) {
|
||||
reinterpret_cast<drm_xe_exec_queue_create *>(execQueueCreate)->flags |= DRM_XE_EXEC_QUEUE_LOW_LATENCY_HINT;
|
||||
}
|
||||
}
|
||||
|
||||
int IoctlHelperXe::createDrmContext(Drm &drm, OsContextLinux &osContext, uint32_t drmVmId, uint32_t deviceIndex, bool allocateInterrupt) {
|
||||
uint32_t drmContextId = 0;
|
||||
|
||||
|
||||
@@ -177,7 +177,7 @@ class IoctlHelperXe : public IoctlHelper {
|
||||
uint16_t getDefaultEngineClass(const aub_stream::EngineType &defaultEngineType);
|
||||
void setOptionalContextProperties(Drm &drm, void *extProperties, uint32_t &extIndexInOut);
|
||||
virtual void setContextProperties(const OsContextLinux &osContext, uint32_t deviceIndex, void *extProperties, uint32_t &extIndexInOut);
|
||||
virtual void applyContextFlags(void *execQueueCreate, bool allocateInterrupt);
|
||||
virtual void applyContextFlags(void *execQueueCreate, bool allocateInterrupt){};
|
||||
|
||||
struct GtIpVersion {
|
||||
uint16_t major;
|
||||
@@ -186,7 +186,6 @@ class IoctlHelperXe : public IoctlHelper {
|
||||
};
|
||||
bool queryHwIpVersion(GtIpVersion >IpVersion);
|
||||
|
||||
bool isLowLatencyHintAvailable = false;
|
||||
int maxExecQueuePriority = 0;
|
||||
std::mutex xeLock;
|
||||
std::mutex gemCloseLock;
|
||||
|
||||
@@ -19,7 +19,6 @@ struct MockIoctlHelperXe : IoctlHelperXe {
|
||||
using IoctlHelperXe::getFdFromVmExport;
|
||||
using IoctlHelperXe::ioctl;
|
||||
using IoctlHelperXe::IoctlHelperXe;
|
||||
using IoctlHelperXe::isLowLatencyHintAvailable;
|
||||
using IoctlHelperXe::maxContextSetProperties;
|
||||
using IoctlHelperXe::maxExecQueuePriority;
|
||||
using IoctlHelperXe::queryGtListData;
|
||||
|
||||
@@ -655,7 +655,6 @@ PipelinedEuThreadArbitration = -1
|
||||
ExperimentalUSMAllocationReuseCleaner = -1
|
||||
DummyPageBackingEnabled = 0
|
||||
EnableDeferBacking = 0
|
||||
ForceLowLatencyHint = -1
|
||||
SetMaxBVHLevels = -1
|
||||
GetSipBinaryFromExternalLib = -1
|
||||
LogUsmReuse = 0
|
||||
|
||||
@@ -2897,74 +2897,3 @@ TEST_F(IoctlHelperXeTest, givenXeIoctlHelperAndDeferBackingFlagSetToTrueWhenMake
|
||||
auto xeIoctlHelper = std::make_unique<IoctlHelperXe>(drm);
|
||||
EXPECT_TRUE(xeIoctlHelper->makeResidentBeforeLockNeeded());
|
||||
}
|
||||
|
||||
TEST_F(IoctlHelperXeTest, givenXeIoctlHelperWhenCreateDrmContextAndLowLatencyHintNotAvailableThenNoFlagIsSet) {
|
||||
class MockLinuxOsContext : public OsContextLinux {
|
||||
public:
|
||||
using OsContextLinux::initializeContext;
|
||||
using OsContextLinux::OsContextLinux;
|
||||
};
|
||||
|
||||
auto executionEnvironment = std::make_unique<MockExecutionEnvironment>();
|
||||
auto drm = DrmMockXe::create(*executionEnvironment->rootDeviceEnvironments[0]);
|
||||
auto xeIoctlHelper = static_cast<MockIoctlHelperXe *>(drm->getIoctlHelper());
|
||||
xeIoctlHelper->contextParamEngine.push_back(drm_xe_engine_class_instance{});
|
||||
MockLinuxOsContext osContext(*drm, 0, 5u, NEO::EngineDescriptorHelper::getDefaultDescriptor({aub_stream::ENGINE_CCS, EngineUsage::regular}));
|
||||
|
||||
osContext.initializeContext(false);
|
||||
EXPECT_EQ(0u, drm->latestExecQueueCreate.flags);
|
||||
}
|
||||
|
||||
TEST_F(IoctlHelperXeTest, givenXeIoctlHelperWhenCreateDrmContextAndLowLatencyHintAvailableThenFlagIsSet) {
|
||||
class MockLinuxOsContext : public OsContextLinux {
|
||||
public:
|
||||
using OsContextLinux::initializeContext;
|
||||
using OsContextLinux::OsContextLinux;
|
||||
};
|
||||
|
||||
auto executionEnvironment = std::make_unique<MockExecutionEnvironment>();
|
||||
auto drm = DrmMockXe::create(*executionEnvironment->rootDeviceEnvironments[0]);
|
||||
auto xeIoctlHelper = static_cast<MockIoctlHelperXe *>(drm->getIoctlHelper());
|
||||
xeIoctlHelper->contextParamEngine.push_back(drm_xe_engine_class_instance{});
|
||||
MockLinuxOsContext osContext(*drm, 0, 5u, NEO::EngineDescriptorHelper::getDefaultDescriptor({aub_stream::ENGINE_CCS, EngineUsage::regular}));
|
||||
|
||||
xeIoctlHelper->isLowLatencyHintAvailable = true;
|
||||
osContext.initializeContext(false);
|
||||
EXPECT_EQ(static_cast<uint32_t>(DRM_XE_EXEC_QUEUE_LOW_LATENCY_HINT), drm->latestExecQueueCreate.flags);
|
||||
}
|
||||
|
||||
TEST_F(IoctlHelperXeTest, whenInitializeIoctlHelperAndLowLatencyNotAvailableThenFlagNotSet) {
|
||||
auto executionEnvironment = std::make_unique<MockExecutionEnvironment>();
|
||||
auto drm = DrmMockXe::create(*executionEnvironment->rootDeviceEnvironments[0]);
|
||||
auto xeIoctlHelper = static_cast<MockIoctlHelperXe *>(drm->getIoctlHelper());
|
||||
|
||||
auto xeQueryConfig = reinterpret_cast<drm_xe_query_config *>(drm->queryConfig);
|
||||
xeQueryConfig->info[DRM_XE_QUERY_CONFIG_FLAGS] = 0;
|
||||
xeIoctlHelper->initialize();
|
||||
EXPECT_FALSE(static_cast<MockIoctlHelperXe *>(xeIoctlHelper)->isLowLatencyHintAvailable);
|
||||
}
|
||||
|
||||
TEST_F(IoctlHelperXeTest, whenInitializeIoctlHelperAndLowLatencyAvailableThenFlagSet) {
|
||||
auto executionEnvironment = std::make_unique<MockExecutionEnvironment>();
|
||||
auto drm = DrmMockXe::create(*executionEnvironment->rootDeviceEnvironments[0]);
|
||||
auto xeIoctlHelper = static_cast<MockIoctlHelperXe *>(drm->getIoctlHelper());
|
||||
|
||||
auto xeQueryConfig = reinterpret_cast<drm_xe_query_config *>(drm->queryConfig);
|
||||
xeQueryConfig->info[DRM_XE_QUERY_CONFIG_FLAGS] = DRM_XE_QUERY_CONFIG_FLAG_HAS_LOW_LATENCY;
|
||||
xeIoctlHelper->initialize();
|
||||
EXPECT_TRUE(static_cast<MockIoctlHelperXe *>(xeIoctlHelper)->isLowLatencyHintAvailable);
|
||||
}
|
||||
|
||||
TEST_F(IoctlHelperXeTest, whenInitializeIoctlHelperAndLowLatencyAvailableButDebugFlagEnabledThenFlagNotSet) {
|
||||
DebugManagerStateRestore restorer{};
|
||||
debugManager.flags.ForceLowLatencyHint.set(0);
|
||||
|
||||
auto executionEnvironment = std::make_unique<MockExecutionEnvironment>();
|
||||
auto drm = DrmMockXe::create(*executionEnvironment->rootDeviceEnvironments[0]);
|
||||
auto xeIoctlHelper = static_cast<MockIoctlHelperXe *>(drm->getIoctlHelper());
|
||||
|
||||
auto xeQueryConfig = reinterpret_cast<drm_xe_query_config *>(drm->queryConfig);
|
||||
xeQueryConfig->info[DRM_XE_QUERY_CONFIG_FLAGS] = DRM_XE_QUERY_CONFIG_FLAG_HAS_LOW_LATENCY;
|
||||
xeIoctlHelper->initialize();
|
||||
EXPECT_FALSE(static_cast<MockIoctlHelperXe *>(xeIoctlHelper)->isLowLatencyHintAvailable);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user