diff options
| author | OreoFR <29048345+OreoFR@users.noreply.github.com> | 2026-11-27 02:53:48 +0100 |
|---|---|---|
| committer | OreoFR <29048345+OreoFR@users.noreply.github.com> | 2026-11-27 02:53:48 +0100 |
| commit | b2cccb953a4282b8b82e7f5266a0b9dc22fab68b (patch) | |
| tree | 2f2632afb67e26c9c256d72e9a5ed779adeed0be /docs | |
| parent | e5d1a14681fa65de2d8b49b2efeeec62370ec8ee (diff) | |
compile gate: probes from submissions only, a ring of recent leaves, and a held limit
Review of #2412 (nicoco23, ecox982745):
- A later create leaving hid the earlier one a held probe needs: last_leave_seq_ kept one leave per
kind, so when A (there when the submission entered) and then B (entered after it) left just before
the submission came back, B replaced A and the probe was not counted. The recent leaves are now a
ring of 64, and any leave of the kind, of a create the submission entered beside, within 500 ms
before it came back counts.
- Presents and idle or semaphore waits passed the gate as probes: they can take seconds on their own
while the GPU is busy, so a slow present could mark a kind as holding, and quick ones could turn a
kind off. SubmitTurn takes `probe` (true by default); the presents, vkQueueWaitIdle,
vkDeviceWaitIdle and vkWaitSemaphores turns pass false. vkQueueSubmit and vkQueueBindSparse probe.
- A kind that holds submissions was waited for with no limit, so a false verdict brought back the
unbounded gate for the rest of the run. It is now waited for up to LEONIDA_COMPILE_GATE_HELD_WAIT_MS
(60 s; 0: no limit), after which the creates in the driver are gone past and not waited for again.
The header comment that said a false alarm "only keeps the bounded gate" is rewritten.
Tests: submit_mutex_test gains both finish orders of A and B, B alone with A still there, a 2.1 s
present that judges nothing, and a holding kind gone past at a 400 ms held limit. All pass (MSVC,
Windows 11). The docs tests pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/d3d12_vulkan.md | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/docs/d3d12_vulkan.md b/docs/d3d12_vulkan.md index 8e71cdd01..6b2a826f8 100644 --- a/docs/d3d12_vulkan.md +++ b/docs/d3d12_vulkan.md | |||
| @@ -2932,10 +2932,14 @@ submitting thread; at the maintainers' decision it was replaced by this one when | |||
| 2932 | counted as held, it re-armed the gate, which then kept the next submission 78 s behind compute creates. A | 2932 | counted as held, it re-armed the gate, which then kept the next submission 78 s behind compute creates. A |
| 2933 | synthetic probe on the same machine (one to three threads creating 2 MB graphics pipelines of 8-10 s each, with | 2933 | synthetic probe on the same machine (one to three threads creating 2 MB graphics pipelines of 8-10 s each, with |
| 2934 | and without `VK_NV_device_diagnostics_config` and a shared pipeline cache) never held a submission past 80 ms. | 2934 | and without `VK_NV_device_diagnostics_config` and a shared pipeline cache) never held a submission past 80 ms. |
| 2935 | While | 2935 | The recent leaves are kept in a ring, so a create that entered after the submission and left after the one it |
| 2936 | a create of a kind that holds submissions is in the driver, no submission goes ahead, at the limit or the budget, | 2936 | entered beside does not hide that one. Only submissions (`vkQueueSubmit`, `vkQueueBindSparse`) probe: presents and |
| 2937 | and such a create is waited for even when one went past it before the verdict: the title then starves as long as | 2937 | idle or semaphore waits pass the gate the same way but can take seconds on their own, so they judge nothing. While |
| 2938 | the create lasts (its watchdog may end the run), but the device is kept. On a device loss the log names every create | 2938 | a create of a kind that holds submissions is in the driver, no submission goes ahead at the limit or the budget, |
| 2939 | and such a create is waited for even when one went past it before the verdict, up to the held limit | ||
| 2940 | (`LEONIDA_COMPILE_GATE_HELD_WAIT_MS`, 60 s; 0 waits however long): then the creates in the driver are gone past | ||
| 2941 | and the next submissions no longer wait for them. A false "holds" verdict so costs at most that per create, not the | ||
| 2942 | rest of the run. On a device loss the log names every create | ||
| 2939 | in the driver (kind, program, SPIR-V size, thread, how long it had been there, whether submissions waited for it) | 2943 | in the driver (kind, program, SPIR-V size, thread, how long it had been there, whether submissions waited for it) |
| 2940 | and each kind's gate. Long graphics creates would leave the title's process only through the compile helper, which | 2944 | and each kind's gate. Long graphics creates would leave the title's process only through the compile helper, which |
| 2941 | builds compute pipelines alone today. | 2945 | builds compute pipelines alone today. |