Files
metal2vulkan/crates
Anees Iqbal 07103eb809 Runtime: a pool's blocks made ahead are summed in place, so a creation call's keep_room allocates no list of them
Memory::keep_ahead, which a creation call's keep_room runs for a pool that grew lately or is
near its next block, read the pool's blocks made, being made and still to make as a Vec of their sizes
(memory/ready.rs's Readying::held) only to sum them. The heap's kept-block budget read the same
Vec through outstanding_bytes. outstanding_bytes now sums them under the readying's lock, and
both callers ask it. held is gone, and lacking takes the sum.

Why: once host_ab settles the device's checks before its workloads, each of the RTX 5080's
texture_256_shared calls found a pool growing (memory.rs's ready_if_growing) and read the list:
one allocation a call. texture_256_shared allocs went from 25.312 to 26.312 a call in every run
(bound 32). An allocation trace of the group's counted window
(base against the settled tree, 2 runs each) named held <- keep_ahead <- ready_if_growing <-
keep_room <- new_texture_now as the only site that differed, 1.000 a call.

Verified (release host_ab against development 58c3147007):
- RTX 5080 Laptop, 16 runs each: texture_256_shared allocs read 25.312 in every run, as at
  base (26.312 without this commit). Every row is the same as at base, apart from
  heap_texture_256 allocs (15.25 -> 12.25, the previous commit) and buffer_texture_256 (within
  its bound in 16 of 16 runs; base over it in 4 of 16).
- lavapipe: texture_256_shared allocs 31.312 -> 29.312 (base 32.312); every row within its
  bound, 6 of 6 runs.
- 780M PHOENIX: texture_256_shared 29.312 (base 30.312); no row moved up.
- tests::memory, tests::host_memory, tests::host_image_room, tests::device_memory_overflow,
  tests::blocks_ahead and tests::zeroed_start: RTX 3090 56 passed (2 ignored), PHOENIX 56 passed
  (2 ignored), lavapipe 57 passed.
- clippy (plain, --cfg m2v_gpu, --cfg m2v_cpu_icd) and rustdoc -D warnings clean on Linux.
2026-11-11 06:16:11 -08:00
..