Files
reims-vgpu/guest/bundle
Anees Iqbal cd97375825 🆕 Name a process's commit order across its queues in the bundle
Metal orders a tracked resource across a process's queues by the order the
command buffers were committed in (dgpu-oracle.md, Q6), and the host takes
each queue's ring on a thread of its own, so a plain commit on one queue could
reach the platform ahead of another queue's earlier one: the oracle's
two-queue row raced in 4 of 15 runs on the lane, every word stale.

Where the device's word holds COMMIT_ORDER, the device makes the process's
commit order (RgfxCommitOrder.hpp) and each queue it makes takes a slot there:
its id and the seqno of its latest buffer on its ring. Before a buffer goes on
its ring, it names in one COMMIT_ORDER op each other queue whose latest rose
since this queue last named it, at that seqno, and its own slot rises once it
is on the ring. So a buffer named was on its ring before the read that names
it, and two buffers never name each other: the host's waits run from later
posts to earlier ones. A post that finds nothing new carries no op, and costs
two loads a slot of the process's queues.

The shell tests pin what each post names (never its own queue, nor a queue
that takes no part, nor one with nothing new) and that two queues posting at
once over 20,000 posts each never name each other both ways. No host offers
the bit yet, so nothing the host observes changes.
2026-11-05 21:59:29 -08:00
..