While a queue's service thread walked a buffer on its own thread, it marked
the ring as it marks it before it sleeps, so the guest rang the queue's
doorbell for every buffer it published meanwhile: a VM exit that answered
nothing for a buffer that does not ask for its CB_SUBMITTED, in two of three
commits of a back-to-back run on a 26.7.2 guest (11.9 µs a doorbell on a
780M host). The thread now marks the ring walking (consumer_idle 2,
RGFX_CONSUMER_WALKING), for which the bundle rings only for a command buffer
whose last op is its ask, which the doorbell's write may answer; the thread
takes the rest after the walk, as before. A bundle that rings only for 1
rings for none during a walk, and its asking buffer is answered at that take.
What the guest sees: consumer_idle reads 2 during a walk, where it read 1.
Measured with commit_split, before and after in one job each, cold boots of
26.7.2 on um870 (m3-max-23492, m3-max-23493):
- RTX 3090: a back-to-back commit 15.8 -> 2.2 µs (median), doorbells 0.57 ->
0.30 a commit, 22.5 -> 20.2 µs a buffer over 100,000 buffers; a commit's
CPU time in encode_probe's cb.commit 19.6-21.2 -> 15.3-15.7 µs.
- Radeon 780M: 44.5-46.5 -> 44.7-45.3 µs a buffer, bound by the host's
submits; doorbells 0.66 -> 0.54 a commit, the rest of them posts that wait
for room; cb.commit's CPU time 19.6-20.2 -> 18.4-18.9 µs.
An idle queue's single commit rings as before (16.4-17.4 µs on both).