* add common host function worker interface
* add worker as a single thread per csr with 3 modes
* add logic for waiting on internal tag, check gpu hang
* if tag is in pending state, read callback data, run callback
and signal completion
* threads will exit the work loop once stop request
is called in finish
* add multi thread unit tests
Related-To: NEO-14577
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
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>