mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 05:24:02 +08:00
performance: remove trim candidate list
Related-To: NEO-11755 Removing trim candidate list reduces overhead caused by residency handling. Allocations required for eviction are placed in eviction container managed by CSR. Signed-off-by: Szymon Morek <szymon.morek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
6455d4648c
commit
b8f181d50e
@@ -146,14 +146,12 @@ SubmissionStatus WddmCommandStreamReceiver<GfxFamily>::flush(BatchBuffer &batchB
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
SubmissionStatus WddmCommandStreamReceiver<GfxFamily>::processResidency(const ResidencyContainer &allocationsForResidency, uint32_t handleId) {
|
||||
SubmissionStatus WddmCommandStreamReceiver<GfxFamily>::processResidency(ResidencyContainer &allocationsForResidency, uint32_t handleId) {
|
||||
return static_cast<OsContextWin *>(this->osContext)->getResidencyController().makeResidentResidencyAllocations(allocationsForResidency, this->requiresBlockingResidencyHandling) ? SubmissionStatus::success : SubmissionStatus::outOfMemory;
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
void WddmCommandStreamReceiver<GfxFamily>::processEviction() {
|
||||
static_cast<OsContextWin *>(this->osContext)->getResidencyController().makeNonResidentEvictionAllocations(this->getEvictionAllocations());
|
||||
this->getEvictionAllocations().clear();
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
@@ -217,4 +215,17 @@ CommandStreamReceiver *createWddmDeviceCommandStreamReceiver(bool withAubDump,
|
||||
}
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
void WddmCommandStreamReceiver<GfxFamily>::setupContext(OsContext &osContext) {
|
||||
this->osContext = &osContext;
|
||||
static_cast<OsContextWin *>(this->osContext)->getResidencyController().setCommandStreamReceiver(this);
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
void WddmCommandStreamReceiver<GfxFamily>::addToEvictionContainer(GraphicsAllocation &gfxAllocation) {
|
||||
// Eviction allocations are shared with trim callback thread.
|
||||
auto lock = static_cast<OsContextWin *>(this->osContext)->getResidencyController().acquireLock();
|
||||
this->getEvictionAllocations().push_back(&gfxAllocation);
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
Reference in New Issue
Block a user