1. The large block kept ahead was not kept for the large placements. While a pool's placements
past its 16 MiB blocks are recent, it keeps one 32 MiB block ahead (074d8e762e). But
add_ready and the waits took the smallest made block of the needed size or more. So a burst of
textures that ran through the pool's own 16 MiB blocks before their refill took the 32 MiB
block too, and the next large placement waited for a new one. Shown at d562bd4148 by the new
burst phase of tests::blocks_ahead (24 textures of 4 MiB back to back with a queue use held
open): the burst took the 32 MiB block, nothing made ahead was left (lavapipe and the RX 550),
and the pool ended with 5 and 6 blocks of 32 MiB against 4 large textures.
Fix (memory.rs, memory/ready.rs): a call takes a block within a range (ready::Need). Below the
pool's recent large size it takes no block of that size or more. The waits and the "will a
block come" check use the same range. The pool's own blocks are kept at a full block's worth
again (4 of 16 MiB), and the large block is kept besides them. Before, the large block was
inside the 64 MiB but could already come on top of four small ones. So a pool of 16 MiB blocks
with placements past 16 MiB in the last 10 s keeps up to 64 + 32 MiB ahead; every other pool
keeps 64 MiB, as before 1984. ready.rs and FAST-PATHS' kept-blocks row say so.
2. A call that waited for a block made for it could still make one itself, if another call took
that block first: take_ready then returned false and keep_room made the block in place. Now
Waiter::wait says whether a fitting block was made, and take_ready waits again when one was
but another call took it. Found by reading the path for the 5080's first-growth red at RT 1987.
A call now makes a pool's block itself only where no making serves it: a host-copies placement
while that pool's thread reads pages, a making that failed or a thread that did not start, or a
placement before the device's first creation call.
3. The test placements_past_a_pool_s_small_blocks_find_a_block_of_their_size_made_ahead checked
the device's count of waits, which also counts other pools' blocks. On the RX 550 (job 12498)
it went red with the filtered suite running: 7 waits, 1 after the first 20 MiB texture. Alone,
d562bd4148 passed 3 of 3 with the memory log on (job 12514): 5 waits, 0 after. It now reads the
image pool's made blocks before each later 20 MiB texture, and it adds the burst phase.
Work counts expected to move against 074d8e762e: none in the cost cases. Their pools' blocks are
64 MiB and they place nothing past half a block, so the range is unbounded there and the reserve
is the same. Only a device whose blocks shrank and that places past them keeps the large block
ahead through a burst: fewer blocks_ahead_waited_for, and pooled_memory_blocks_made rises by the
small blocks the burst waits for instead of taking the large one.
(cherry picked from commit b38f14b41a45a152453358a9f6dd5459bf74f3cd)