Skip to content

Commit 8ec5434

Browse files
performance: Enable waitpkg
Resolves: NEO-14336 Signed-off-by: Lukasz Jobczyk <[email protected]>
1 parent f52c81c commit 8ec5434

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

shared/source/command_stream/command_stream_receiver_hw_base.inl

-1
Original file line numberDiff line numberDiff line change
@@ -1430,7 +1430,6 @@ inline bool CommandStreamReceiverHw<GfxFamily>::initDirectSubmission() {
14301430
this->osContext->setDirectSubmissionActive();
14311431
if (this->osContext->isDirectSubmissionLightActive()) {
14321432
this->pushAllocationsForMakeResident = false;
1433-
WaitUtils::init(true);
14341433
}
14351434
}
14361435
}

shared/source/execution_environment/execution_environment.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
namespace NEO {
3232
ExecutionEnvironment::ExecutionEnvironment() {
33-
WaitUtils::init(false);
33+
WaitUtils::init(true);
3434
this->configureNeoEnvironment();
3535
}
3636

shared/test/unit_test/utilities/x86_64/wait_util_tests_x86_64.cpp

+14
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include "shared/source/utilities/wait_util.h"
1010
#include "shared/test/common/helpers/debug_manager_state_restore.h"
1111
#include "shared/test/common/helpers/variable_backup.h"
12+
#include "shared/test/common/mocks/mock_execution_environment.h"
1213
#include "shared/test/common/test_macros/hw_test.h"
1314
#include "shared/test/unit_test/mocks/mock_cpuid_functions.h"
1415

@@ -196,6 +197,19 @@ TEST_F(WaitPkgTest, givenEnabledSetToTrueAndWaitpkgSupportTrueWhenWaitInitialize
196197
EXPECT_TRUE(WaitUtils::waitpkgUse);
197198
}
198199

200+
TEST_F(WaitPkgTest, givenWaitpkgSupportTrueWhenCreateExecutionEnvironmentThenWaitPkgEnabled) {
201+
CpuInfo::cpuidFunc = mockCpuidEnableAll;
202+
203+
WaitUtils::waitpkgSupport = true;
204+
205+
MockExecutionEnvironment executionEnvironment;
206+
207+
EXPECT_EQ(0u, WaitUtils::waitCount);
208+
EXPECT_EQ(10000u, WaitUtils::waitpkgCounterValue);
209+
EXPECT_EQ(0u, WaitUtils::waitpkgControlValue);
210+
EXPECT_TRUE(WaitUtils::waitpkgUse);
211+
}
212+
199213
TEST_F(WaitPkgTest, givenFullyEnabledWaitPkgAndOverrideCounterValueWhenWaitInitializedThenNewCounterValueSet) {
200214
CpuInfo::cpuidFunc = mockCpuidEnableAll;
201215

0 commit comments

Comments
 (0)