rt README: a command buffer is scheduled once the one submit thread's earlier calls return, whatever their queue; the Iris Xe's figures

The known gaps of queues gain the rule behind the running-signal case's
declaration. Every queue's command buffers go to the device's one VkQueue,
which takes one vkQueueSubmit2 call at a time, since Vulkan requires a queue's
host access to be externally synchronized. The device's one submit thread
makes every call (submit.rs has one call site, reached only from the thread's
pass), and it schedules a command buffer once its earlier calls have
returned, whichever queue they were for. So one long driver call delays every
queue's scheduling by its length. The API.md accepted difference the
declaration cites now states the same ground.

Measured on an Iris Xe (RPL-P, ANV):
- m3-max-52564: the device's first submission, 192 fills of a new 256 MiB
  block, spent 27-30 ms in vkQueueSubmit2. The other queue's waiter was
  scheduled 0.02 ms after that call returned, in 3 of 3 runs.
- m3-max-52745, the separating run with the probe's block size as a scratch
  switch, never committed: the first call took 2.1 and 2.5 ms with 1 MiB,
  9.1 ms with 64 MiB and 28.4 ms with 256 MiB. Its time grows with the new
  block the submission first uses. The probe's later submissions took at most
  0.18 ms.
- In the same job, the 256 MiB run (the case's own shape) read Committed and
  the case's declaration fired at both MTLEvent sites, verdict 'announced'.
This commit is contained in:
Anees Iqbal committed 2026-11-19 08:21:53 -08:00
1 parent 3955d3bd01
commit 6eb83eabff
2 files changed
+21 -6

No files matched your search

+7 -6
View File
@@ -6631,12 +6631,13 @@ each item named states the rule in full.
(`metal2vulkan-rt`'s `CommandBuffer::status`, `add_scheduled_handler` and
`wait_until_scheduled`). Apple defines `MTLCommandBufferStatusScheduled` as "All dependencies
have been resolved and the command buffer has been scheduled for execution", and promises no
time between the two. The new runtime schedules each command buffer on the device's one submit
thread, once that thread's earlier `vkQueueSubmit2` calls have returned, whichever queue they
were for (the runtime's README, the known gaps of queues). So a command buffer whose wait an
earlier submission's signal meets stays `Committed`, its scheduled handlers not run, for as long
as that submission's driver call lasts, where an Apple M3 Max had scheduled it while the
signalling command buffer still ran.
time between the two. Every queue's command buffers go to the device's one `VkQueue`, which
takes one `vkQueueSubmit2` call at a time, all made by the device's one submit thread, and the
new runtime schedules each command buffer there once that thread's earlier calls have returned,
whichever queue they were for (the runtime's README, the known gaps of queues). So a command
buffer whose wait an earlier submission's signal meets stays `Committed`, its scheduled
handlers not run, for as long as that submission's driver call lasts, where an Apple M3 Max had
scheduled it while the signalling command buffer still ran.
**Process exit**