Commit Graph

45 Commits

Author SHA1 Message Date
Compute-Runtime-Validation
bafb847c73 Revert "fix: use condition variables instead of busy waits in worker threads"
This reverts commit 9d1da44e08.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2025-10-06 20:38:46 +02:00
Igor Venevtsev
9d1da44e08 fix: use condition variables instead of busy waits in worker threads
Resolves: NEO-16085, GSD-11678, HSD-14025819208

Signed-off-by: Igor Venevtsev <igor.venevtsev@intel.com>
2025-10-06 13:27:34 +02:00
Compute-Runtime-Validation
6736378c4d Revert "fix: use condition variables instead of busy waits in worker threads"
This reverts commit 452475a0b9.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2025-09-23 17:06:18 +02:00
Igor Venevtsev
452475a0b9 fix: use condition variables instead of busy waits in worker threads
Resolves: NEO-16085, GSD-11678, HSD-14025819208

Signed-off-by: Igor Venevtsev <igor.venevtsev@intel.com>
2025-09-23 14:44:39 +02:00
Compute-Runtime-Validation
ac225e204d Revert "performance: set 1ms ulls timeout on linux"
This reverts commit 8ae49b17ae.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2025-09-19 06:59:27 +02:00
Szymon Morek
8ae49b17ae performance: set 1ms ulls timeout on linux
Related-To: NEO-13843

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2025-09-18 11:48:12 +02:00
Slawomir Milczarek
e80b84e699 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>
2025-09-12 09:32:59 +02:00
Compute-Runtime-Validation
93b2e68707 Revert "performance: set 1ms ulls timeout on linux"
This reverts commit 0ea4b8cf9c.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2025-08-20 14:55:30 +02:00
Szymon Morek
0ea4b8cf9c performance: set 1ms ulls timeout on linux
Related-To: NEO-13843

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2025-08-19 14:05:31 +02:00
Szymon Morek
1d842c58bf performance: don't terminate ULLS if BCS is busy
Related-To: NEO-15452

If CCS is idle, but BCS is busy, keep CCS ULLS
context running. BMG only.

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2025-07-17 17:46:23 +02:00
Szymon Morek
558752288f performance: set 1ms ULLS timeout on Windows since Xe2
Related-To: NEO-13843

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2025-06-17 08:09:24 +02:00
Szymon Morek
6a7f6f1ad6 fix: add noexcept to move operators
Without it, copy operator is selected, even if move is explicitly defined.

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2025-06-09 10:32:23 +02:00
Szymon Morek
3596522637 refactor: remove unused logic in ULLS controller
Related-To: NEO-13843

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2025-04-17 18:35:20 +02:00
Szymon Morek
82fba79d9d performance: set 1ms timeout for ulls controller on LNL and PTL
Related-To: NEO-13843

Limit scope to Windows only.

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2025-03-06 09:13:58 +01:00
Compute-Runtime-Validation
f907c7dcb2 Revert "performance: set 1ms timeout for ulls controller since xe2"
This reverts commit 28c008e438.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2025-02-24 15:04:54 +01:00
Szymon Morek
28c008e438 performance: set 1ms timeout for ulls controller since xe2
Related-To: NEO-13843

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2025-02-19 13:48:26 +01:00
Compute-Runtime-Validation
768e15bab2 Revert "performance: reduce ULLS controller timeout to 1ms"
This reverts commit 0db7128503.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2025-01-30 03:41:58 +01:00
Szymon Morek
0db7128503 performance: reduce ULLS controller timeout to 1ms
Currently scope limited to Windows only

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2025-01-28 22:27:09 +01:00
Szymon Morek
1f60935930 fix: don't return csr as busy if gpu hang is detected
Related-To: NEO-13071

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2024-10-30 16:17:38 +01:00
Bartosz Dunajski
9d76158c1f feature: debug flag to change ULLS BCS timeout
Related-To: HSD-18040119232

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2024-10-23 18:18:42 +02:00
Szymon Morek
01a0b8e7f7 performance: improve ULLS controller timeout detection
Related-To: NEO-12991

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2024-10-22 13:53:25 +02:00
Szymon Morek
e6abfafa16 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>
2024-09-03 07:45:25 +02:00
Szymon Morek
d4c1631ac7 performance: don't wait for paging fence on user thread
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>
2024-08-07 08:30:51 +02:00
Filip Hazubski
cb654c97b0 refactor: Update DirectSubmissionState
Define missing functions to comply with the rule of five.

Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2024-04-25 11:37:42 +02:00
Dominik Dabek
b109094e4b fix: move ulls controller stop thread
Move ulls controller thread stopping to execution environment
destructor. This removes the vptr race from ulls controller destructor.

Put tests that are actually running the ulls controller into multi thread
tests.

That way they are compiled with thread sanitizer and removes the
variable test time from traditional ULTS.

Related-To: NEO-10942

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2024-04-02 08:26:19 +02:00
Dominik Dabek
b95dd1d405 fix: add assignment operator to ulls state
Fix for coverity issue, copy without assign.

Related-To: NEO-10942

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2024-03-28 16:32:35 +01:00
Dominik Dabek
a7479e6332 fix: ulls controller state and tests
Make the fields in direct submission state atomic.
Add thread yields to waiting loop in tests to avoid compiler optimizing
them away.

Related-To: NEO-10942

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2024-03-28 14:38:33 +01:00
Dominik Dabek
295b58a11f fix: move ulls controller thread start
Move starting ulls controller thread outside constructor to avoid vptr
race.

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2024-03-27 08:06:50 +01:00
Dominik Dabek
562d6f114b performance: helper for adjust ULLS on battery
Related-To: NEO-10800

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2024-03-26 12:57:30 +01:00
Dominik Dabek
2b964254d6 performance: debug key for adjust ULLS on battery
ULLS controller timeout settings will be adjusted based on ac line
status and lowest queue throttle from submissions.

Lowest queue throttle is reset when controller stops ULLS.

Related-To: NEO-10800

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2024-03-22 14:24:00 +01:00
Compute-Runtime-Validation
a099903ebd Revert "performance: change ulls controller max timeout"
This reverts commit 8de06f5d64.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2023-06-20 05:38:52 +02:00
Dominik Dabek
8de06f5d64 performance: change ulls controller max timeout
Set ulls controller max timeout to 200ms

Related-To: NEO-7878

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2023-06-19 17:04:33 +02:00
Dominik Dabek
411ed1c643 feat: direct submission variable timeout
Add mechanism to increase direct submission timeout up to a maximum
value when no new submissions were made since last sleep.

This should help in workloads that have delays between iterations larger
than current direct submission controller timeout.

Related-To: NEO-7878

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2023-04-18 17:33:55 +02:00
Warchulski, Jaroslaw
c43233dabf Cleanup includes 42
Cleaned up files:
level_zero/core/source/kernel/kernel_hw.h
shared/source/helpers/common_types.h
shared/test/common/libult/linux/drm_mock.h
shared/test/common/libult/ult_command_stream_receiver.h

Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-01-25 09:16:39 +01:00
Maciej Plewka
4b42b066f8 Use dedicated using type for TaskCount
Related-To: NEO-7155

Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
2022-11-28 16:44:44 +01:00
Lukasz Jobczyk
ba244634b3 Set the default value of the controller timeout divisor to 1
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2022-08-05 09:52:58 +02:00
Lukasz Jobczyk
9761098733 Track ccs count per subdevice in direct submission controller
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2022-06-20 11:52:01 +02:00
Lukasz Jobczyk
921f76eea0 Calculate timeout using CCSes count
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2022-05-25 11:44:11 +02:00
Lukasz Jobczyk
d440d26c69 Ensure sleep is called in direct submission controller
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2022-05-24 14:25:24 +02:00
Lukasz Jobczyk
13f8139951 Change direct submission controller unit to microseconds
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2022-05-23 08:34:49 +02:00
Lukasz Jobczyk
888c935efb Do not wait for completion in direct submission controller
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2022-05-19 11:12:42 +02:00
Lukasz Jobczyk
4ea452040d Defer direct submission control until first submit
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2021-10-29 14:27:25 +02:00
Lukasz Jobczyk
5a240e1d66 Enable direct submission controller
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2021-10-26 12:07:11 +02:00
Lukasz Jobczyk
67ed62e805 Use NEO::Thread instead of std::thread
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2021-09-14 14:09:18 +02:00
Lukasz Jobczyk
1638554a49 Add direct submission termination mechanism
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2021-08-20 13:57:28 +02:00