Related-To: NEO-13325
Replace blocking obtainUniqueOwnership() with tryObtainUniqueOwnership()
in critical paths to prevent deadlock between controller thread holding
directSubmissionsMutex and submission threads holding CSR locks.
Changes:
- Add CommandStreamReceiver::tryObtainUniqueOwnership() method
- Use try_lock in checkNewSubmissions() and context group idle detection
- Skip contended CSRs instead of blocking (conservative approach)
- Add comprehensive unit tests for try_lock functionality
Fixes deadlock scenario where registerDirectSubmission() waits for
directSubmissionsMutex while checkNewSubmissions() holds it and waits
for CSR ownership locks.
Signed-off-by: Slawomir Milczarek <slawomir.milczarek@intel.com>
Make sure hostFunctionInitialized bool is set after actual operations
are done
Related-To: NEO-14577
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
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>
Require tag update on mem copy with external host ptr.
Without this, temporary allocation might not be cleaned before next copy
operation.
If a second copy operation is passed same ptr that has been reallocated,
there will be a pagefault.
Related-To: NEO-15663
Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
- readOnly ISA allocations must be written through CPU pointer
- command buffer allocation in singleAddressSpaceSbaTracking mode cannot
be readonly - it is written by SBA tracking commands
- this change is fixing ZET_ENABLE_PROGRAM_DEBUGGING mode 2
Related-To: GSD-10359
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
Pass hwInfo to isHeaplessModeEnabled and isForceBindlessRequired functions.
Related-To: NEO-14526
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
Do not check if ULLS light is active during every Csr::makeResident
call. Store that information once during ULLS init.
Related-To: NEO-13922
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
No perforamce impact expected since it is initialized once only,
but has the advantage of using custom allocator by overriding malloc.
Related-To: NEO-12846
Signed-off-by: Slawomir Milczarek <slawomir.milczarek@intel.com>
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>
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>
Related-To: NEO-12197
Currently for new resources user thread must wait before submitting
actual workload. With this commit, instead of waiting on user thread,
request is sent to background ULLS controller thread and additional
semaphore is programmed. ULLS controller will perform actual wait
and signal semaphore when paging fence reaches required value.
Signed-off-by: Szymon Morek <szymon.morek@intel.com>