Files
metal2vulkan/crates
Anees Iqbal 17ce150bbe rt store: a lookup reads no state
What: a lookup read the 24-byte state record (young's number) from the state file each time.
The store now keeps young's number as it last read or wrote the state: read at open, refreshed
by every update under the lock, and only growing. A lookup reads it from memory.

A move to the next generation that another store on the directory made is seen at this store's
next write. Until then its lookups try the generations it knew: a file the other wrote into the
new young is a miss, and a hit in what is now old is not moved into young. Both cost a miss at
worst, and every file still checks itself. In rt a miss is followed by a write in nearly every
case (a lowering or refusal kept; a pipeline's data kept by the reaper, unless more than 64
caches wait for it), and a write reads the state under the lock.

Why: the planner asked for the second render state's own time on the UHD to come down. Probe
job m3-max-45357 (homelab-mac-mini-2018, NTFS) split its 319 us of store lookups: about 50 us
were the state record read once per lookup, over three lookups.

Test: a_lookup_reads_no_state_and_sees_another_stores_move_at_its_next_write counts the state
reads of 20 lookups (none), and shows a move another store made seen after the next write.
2026-11-18 02:53:52 -08:00
..