Files
metal2vulkan/crates
Anees Iqbal 155f97fbfd RUNTIME 2352: Host RAM: an object moves the window to its chunk only once it holds it
RamOnDevice::chunk moved the device's thread's window to an object's chunk
(take + notify) before the object marked the chunk's import in flight. The
window's first slot is the chunk just taken, so the woken thread could find it
not imported and import it By::Ahead in the object's place: counted as imported
ahead and marked untaken, with the object waiting for that import at the
thread's pace (SCHED_BATCH on Linux, utility QoS on Apple). Off Linux the thread
does no fault-in before an import, so it reaches the claims lock at once; that
is the failure seen once on the Windows mini under nextest -j 4:
a_chunk_bound_buffer_and_a_copy_of_its_pages_order_by_their_host_bytes saw ahead
imports 3 where 2 were expected (chunks 0 and 2 by the thread, then 3 within
settled()'s 300 ms).

Now the window moves (RamOnDevice::took) once the object holds the chunk: found
made, marked in flight by it, or held back. The thread, woken by the move,
finds the chunk in flight or made and imports the ones past it.

Test: an_object_holds_its_chunk_before_the_window_moves_to_it holds the
object's call 300 ms before it holds the chunk (RamSource::taking_pause, a new
cfg(test) pause beside making_pause) and checks the object imported its chunk
and the thread one past it alone.

Evidence (lane jobs, msi): m3-max-32427: clippy -p metal2vulkan-runtime --all-targets --all-features -D warnings 0;
lavapipe 78/78 (host_ram_device, host_ram_copy_device, host_ram:: units) incl. the new
an_object_holds_its_chunk_before_the_window_moves_to_it and the original a_chunk_bound_buffer_and_a_copy_of_its_pages_...
Negative control m3-max-32428 (the take back at the top of chunk()): the focused test fails, "the object imported its
chunk, the thread not in its place: left 0, right 1". The Windows mini runs follow in the lane.

Lane commit: 10dfe36dce.
2026-11-15 07:31:27 -08:00
..