Skip to content

Commit ba24463

Browse files
Set the default value of the controller timeout divisor to 1
Signed-off-by: Lukasz Jobczyk <[email protected]>
1 parent 8b5c567 commit ba24463

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

shared/source/debug_settings/debug_variables_base.inl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ DECLARE_DEBUG_VARIABLE(int32_t, DirectSubmissionNewResourceTlbFlush, -1, "-1: dr
304304
DECLARE_DEBUG_VARIABLE(int32_t, DirectSubmissionDisableMonitorFence, -1, "Disable dispatching monitor fence commands")
305305
DECLARE_DEBUG_VARIABLE(int32_t, EnableDirectSubmissionController, -1, "Enable direct submission terminating after given timeout, -1: default, 0: disabled, 1: enabled")
306306
DECLARE_DEBUG_VARIABLE(int32_t, DirectSubmissionControllerTimeout, -1, "Set direct submission controller timeout, -1: default 5000 us, >=0: timeout in us")
307-
DECLARE_DEBUG_VARIABLE(int32_t, DirectSubmissionControllerDivisor, -1, "Set direct submission controller timeout divider, -1: default 2, >0: divider value")
307+
DECLARE_DEBUG_VARIABLE(int32_t, DirectSubmissionControllerDivisor, -1, "Set direct submission controller timeout divider, -1: default 1, >0: divider value")
308308
DECLARE_DEBUG_VARIABLE(int32_t, DirectSubmissionForceLocalMemoryStorageMode, -1, "Force local memory storage for command/ring/semaphore buffer, -1: default - for all engines, 0: disabled, 1: for multiOsContextCapable engine, 2: for all engines")
309309
DECLARE_DEBUG_VARIABLE(int32_t, EnableRingSwitchTagUpdateWa, -1, "-1: default, 0 - disable, 1 - enable. If enabled, completionFences wont be updated if ring is not running.")
310310
DECLARE_DEBUG_VARIABLE(int32_t, DirectSubmissionReadBackCommandBuffer, -1, "-1: default - disabled, 0 - disable, 1 - enable. If enabled, read first dword of cmd buffer after handling residency.")

shared/source/direct_submission/direct_submission_controller.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,6 @@ class DirectSubmissionController {
5454
std::atomic_bool runControlling = false;
5555

5656
int timeout = 5000;
57-
int timeoutDivisor = 4;
57+
int timeoutDivisor = 1;
5858
};
5959
} // namespace NEO

shared/test/unit_test/direct_submission/direct_submission_controller_tests.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ TEST(DirectSubmissionControllerTests, givenDirectSubmissionControllerWithNotStar
133133
controller.directSubmissionControllingThread.reset();
134134
}
135135

136-
TEST(DirectSubmissionControllerTests, givenDirectSubmissionControllerWhenRegisterCsrsThenTimeoutIsAdjusted) {
136+
TEST(DirectSubmissionControllerTests, givenDirectSubmissionControllerWhenRegisterCsrsThenTimeoutIsNotAdjusted) {
137137
MockExecutionEnvironment executionEnvironment;
138138
executionEnvironment.prepareRootDeviceEnvironments(1);
139139
executionEnvironment.initializeMemoryManager();
@@ -183,13 +183,13 @@ TEST(DirectSubmissionControllerTests, givenDirectSubmissionControllerWhenRegiste
183183
EXPECT_EQ(controller.timeout, 5000);
184184

185185
controller.registerDirectSubmission(&csr1);
186-
EXPECT_EQ(controller.timeout, 1250);
186+
EXPECT_EQ(controller.timeout, 5000);
187187

188188
controller.registerDirectSubmission(&csr2);
189-
EXPECT_EQ(controller.timeout, 312);
189+
EXPECT_EQ(controller.timeout, 5000);
190190

191191
controller.registerDirectSubmission(&csr4);
192-
EXPECT_EQ(controller.timeout, 312);
192+
EXPECT_EQ(controller.timeout, 5000);
193193

194194
controller.unregisterDirectSubmission(&csr);
195195
controller.unregisterDirectSubmission(&csr1);
@@ -199,6 +199,8 @@ TEST(DirectSubmissionControllerTests, givenDirectSubmissionControllerWhenRegiste
199199
}
200200

201201
TEST(DirectSubmissionControllerTests, givenDirectSubmissionControllerWhenRegisterCsrsFromDifferentSubdevicesThenTimeoutIsAdjusted) {
202+
DebugManagerStateRestore restorer;
203+
DebugManager.flags.DirectSubmissionControllerDivisor.set(4);
202204
MockExecutionEnvironment executionEnvironment;
203205
executionEnvironment.prepareRootDeviceEnvironments(1);
204206
executionEnvironment.initializeMemoryManager();

0 commit comments

Comments
 (0)