mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 13:33:02 +08:00
fix: drain paging fence queue before waiting for resources
Related-To: NEO-12197 If ULLS controller waits for CSR lock, and driver must wait for resources due to OOM, then draing paging fence queue directly Signed-off-by: Szymon Morek <szymon.morek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
9559445e7f
commit
e6abfafa16
@@ -208,6 +208,16 @@ void DirectSubmissionController::enqueueWaitForPagingFence(CommandStreamReceiver
|
||||
condVar.notify_one();
|
||||
}
|
||||
|
||||
void DirectSubmissionController::drainPagingFenceQueue() {
|
||||
std::lock_guard lock(this->condVarMutex);
|
||||
|
||||
while (!pagingFenceRequests.empty()) {
|
||||
auto request = pagingFenceRequests.front();
|
||||
pagingFenceRequests.pop();
|
||||
request.csr->unblockPagingFenceSemaphore(request.pagingFenceValue);
|
||||
}
|
||||
}
|
||||
|
||||
void DirectSubmissionController::handlePagingFenceRequests(std::unique_lock<std::mutex> &lock, bool checkForNewSubmissions) {
|
||||
UNRECOVERABLE_IF(!lock.owns_lock())
|
||||
while (!pagingFenceRequests.empty()) {
|
||||
|
||||
@@ -57,6 +57,7 @@ class DirectSubmissionController {
|
||||
static bool isSupported();
|
||||
|
||||
void enqueueWaitForPagingFence(CommandStreamReceiver *csr, uint64_t pagingFenceValue);
|
||||
void drainPagingFenceQueue();
|
||||
|
||||
protected:
|
||||
struct DirectSubmissionState {
|
||||
|
||||
Reference in New Issue
Block a user