Add alternative residency model on Linux

Related-To: NEO-4732

Change-Id: I79e165d2b647af200ca314e1183ecf05903de644
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk
2020-07-02 11:49:46 +02:00
parent 519e75e3d6
commit ff0add74e3
50 changed files with 521 additions and 272 deletions

View File

@@ -69,12 +69,8 @@ bool DrmCommandStreamReceiver<GfxFamily>::flush(BatchBuffer &batchBuffer, Reside
auto memoryOperationsInterface = static_cast<DrmMemoryOperationsHandler *>(this->executionEnvironment.rootDeviceEnvironments[this->rootDeviceIndex]->memoryOperationsInterface.get());
std::unique_lock<std::mutex> lock;
if (DebugManager.flags.MakeAllBuffersResident.get()) {
lock = memoryOperationsInterface->acquireLock();
}
memoryOperationsInterface->mergeWithResidencyContainer(allocationsForResidency);
auto lock = memoryOperationsInterface->lockHandlerForExecWA();
memoryOperationsInterface->mergeWithResidencyContainer(this->osContext, allocationsForResidency);
this->flushStamp->setStamp(bb->peekHandle());
this->flushInternal(batchBuffer, allocationsForResidency);
@@ -120,7 +116,7 @@ template <typename GfxFamily>
void DrmCommandStreamReceiver<GfxFamily>::processResidency(const ResidencyContainer &inputAllocationsForResidency, uint32_t handleId) {
for (auto &alloc : inputAllocationsForResidency) {
auto drmAlloc = static_cast<DrmAllocation *>(alloc);
drmAlloc->getBOsForResidency(osContext->getContextId(), handleId, this->residency);
drmAlloc->makeBOsResident(osContext->getContextId(), 0u, handleId, &this->residency, false);
}
}