performance: Optimize make resident for ULLS light

Do not check if ULLS light is active during every Csr::makeResident
call. Store that information once during ULLS init.

Related-To: NEO-13922

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk
2025-02-24 10:50:20 +00:00
committed by Compute-Runtime-Automation
parent 50e22ef5e7
commit be946ae56c
5 changed files with 20 additions and 2 deletions

View File

@@ -963,6 +963,19 @@ HWTEST_TEMPLATED_F(DrmCommandStreamDirectSubmissionTest, givenDirectSubmissionLi
executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]->memoryOperationsInterface.reset(oldMemoryOperationsInterface);
}
HWTEST_TEMPLATED_F(DrmCommandStreamDirectSubmissionTest, givenDirectSubmissionLightWhenMakeResidentThenDoNotAddToCsrResidencyContainer) {
auto testedCsr = static_cast<TestedDrmCommandStreamReceiver<FamilyType> *>(csr);
testedCsr->directSubmission.reset();
csr->initDirectSubmission();
EXPECT_FALSE(testedCsr->pushAllocationsForMakeResident);
EXPECT_EQ(testedCsr->getResidencyAllocations().size(), 0u);
DrmAllocation graphicsAllocation(0, 1u /*num gmms*/, AllocationType::unknown, nullptr, nullptr, 1024, static_cast<osHandle>(1u), MemoryPool::memoryNull);
csr->makeResident(graphicsAllocation);
EXPECT_EQ(testedCsr->getResidencyAllocations().size(), 0u);
}
template <typename GfxFamily>
struct MockDrmDirectSubmission : public DrmDirectSubmission<GfxFamily, RenderDispatcher<GfxFamily>> {
using DrmDirectSubmission<GfxFamily, RenderDispatcher<GfxFamily>>::currentTagData;