Files
reims-vgpu/docs
Anees Iqbal d0f61d5b5c 🐎 Mark a queue's ring idle through a walk on its thread
Since car 12 (757de8422) a queue's service thread walks and commits a
short buffer that waits for nothing itself. b5182273d then let the queue's
claim go before that walk, so a doorbell rung during the walk could answer
the next buffer. But the guest rings a queue's doorbell only while the host
marks the ring idle (consumer_idle 1), and the service thread kept it
marked busy through the walk and the commit. A buffer published during
them got no doorbell, and its CB_SUBMITTED waited for the take after the
commit. On the RTX 5080 host that is submit_probe's submitted.tiny.behind:
p50 26-32 us and p90 48-175 us against the control's 18 and 27-35, with a
second hump at 128-256 us (car 13 rerun, c13t-sublk).

When the host lets the claim go, the ring is now marked idle, with a full
fence before the look at the ring, as before the thread sleeps. The mark is
cleared when the thread takes the claim back. A buffer published during the
walk is rung for and answered inside its doorbell write, on the vCPU's
thread, where it waits for nothing, as behind a walk on a lane thread.

What the guest sees: such a buffer's CB_SUBMITTED comes inside the
doorbell write, before the walk ahead of it ends, not after that buffer's
commit. The guest also rings once for each buffer it publishes during such
a walk, as it does for a sleeping thread.

The walk test now rings only where the ring is marked idle, as the guest's
writer does, and fails without the mark. The behind measurement rings that
way too.
2026-11-05 21:59:36 -08:00
..