feature: Don't terminate ULLS contexts if busy context exists

Enhanced direct submission idle detection to ensure that
ULLS contexts are not terminated if any context in the same group
is still busy or has pending work.
Idle detection now accurately considers the state of all CSRs
in a context group before terminating any direct submission.
Controlled with DirectSubmissionControllerContextGroupIdleDetection
(note: the feature is disabled by default in first step).

Related-To: NEO-13325

Signed-off-by: Slawomir Milczarek <slawomir.milczarek@intel.com>
This commit is contained in:
Slawomir Milczarek
2025-09-12 08:21:40 +00:00
committed by Compute-Runtime-Automation
parent c32e639472
commit e80b84e699
8 changed files with 512 additions and 21 deletions

View File

@@ -664,6 +664,20 @@ void CommandStreamReceiver::drainPagingFenceQueue() {
}
}
// Returns a unique identifier for the context group this CSR belongs to
uint32_t CommandStreamReceiver::getContextGroupId() const {
const OsContext &osContext = this->getOsContext();
// If the context is part of a group, use the primary context's id as the group id
if (osContext.isPartOfContextGroup()) {
const OsContext *primary = osContext.getPrimaryContext();
if (primary != nullptr) {
return primary->getContextId();
}
}
// Otherwise, use this context's id
return osContext.getContextId();
}
GraphicsAllocation *CommandStreamReceiver::allocateDebugSurface(size_t size) {
UNRECOVERABLE_IF(debugSurface != nullptr);
if (primaryCsr) {