Files
reims-vgpu/docs
Anees Iqbal 1e88f5d90b 🐎 Circulate the two kept staging pieces, with no top-ups
The staged copies' spare pieces were topped up on a thread of their own
after each copy. One 780M walk made 72 scratch pieces beside 27 spares
topped up, and on the 780M a buffer make holds the process's submits
through the driver's lock (6 submits, median 6.50 ms, max 9.76 ms), so a
make on any thread holds up the guest's work.

The two kept pieces now circulate instead. The first two pieces made are
whole 16 MiB pieces, kept; a copy takes an idle kept piece and gives it
back to the kept ones when its command buffer completes. Nothing is made
after a copy, and the top-up thread
(reims-vgpu.graphics-staging-spares-<i>) is gone. A copy that finds no
kept piece idle makes a scratch piece of the length it needs on its own
thread and lets it go once its copy is done, counted as before. Scratch
pieces given back under the caches' lock are let go of after it.

What changes for the guest: its copies make no staging buffers but the
first two kept pieces and the scratch pieces of copies that find none
idle, and nothing makes buffers between copies; the first two copies
make a whole 16 MiB piece where they made the length they needed.

Counters: rt-staging-spares-unused is gone; rt-staging-spares-dropped
(-kib) counts kept pieces let go of without coming back, and
rt-staging-piece-get-ns and -max-ns time each copy's getting a piece.
2026-11-19 23:16:04 -08:00
..