mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
Revert "fix: Fix DirectSubmissionController deadlock with try_lock pattern"
Related-To: NEO-13325
This reverts commit 40ce5eb55e.
Signed-off-by: Slawomir Milczarek <slawomir.milczarek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
286f973d0c
commit
393c4d0985
@@ -136,10 +136,7 @@ void DirectSubmissionController::checkNewSubmissions() {
|
||||
if (!isBcs && csr->getProductHelper().checkBcsForDirectSubmissionStop()) {
|
||||
isCopyEngineIdle = isCopyEngineOnDeviceIdle(csr->getRootDeviceIndex(), bcsTaskCount);
|
||||
}
|
||||
auto lock = csr->tryObtainUniqueOwnership();
|
||||
if (!lock.owns_lock()) {
|
||||
continue; // Skip this CSR if contended - avoid deadlock
|
||||
}
|
||||
auto lock = csr->obtainUniqueOwnership();
|
||||
if (!isCsrIdleDetectionEnabled || (isDirectSubmissionIdle(csr, lock) && isCopyEngineIdle)) {
|
||||
csr->stopDirectSubmission(false, false);
|
||||
state.isStopped = true;
|
||||
@@ -209,11 +206,7 @@ bool DirectSubmissionController::isDirectSubmissionIdle(CommandStreamReceiver *c
|
||||
|
||||
auto otherKey = ContextGroupKey{otherCsr->getRootDeviceIndex(), otherCsr->getContextGroupId()};
|
||||
if (otherKey == myKey) {
|
||||
auto otherLock = otherCsr->tryObtainUniqueOwnership();
|
||||
if (!otherLock.owns_lock()) {
|
||||
allOthersIdle = false;
|
||||
break; // Treat contended CSR as active - avoid deadlock
|
||||
}
|
||||
auto otherLock = otherCsr->obtainUniqueOwnership();
|
||||
if (!checkCSRIdle(otherCsr, otherLock)) {
|
||||
allOthersIdle = false;
|
||||
break; // Early exit for performance
|
||||
|
||||
Reference in New Issue
Block a user