Port 2: ~98% of the fallback's "view records no store told of" have the same 12-byte head as before; the memcpy/memmove hook marks 0 records #519
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Belobug--VIctory-Belobug-AMD#519
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@adrianmjim on GitHub · 2026-11-27 08:10 UTC · original
Follow-up to #338 and #354. On RDNA3 with #354, the port 2 fallback still reports ~138
view records no store told ofper frame (see my last comment on #338). I added counters to see which records those are. Almost none have a new head. The slot still holds the same 12-byte head port 2 saw last time, and only bytes after the head changed.Links are to a-publier
4eb6cfd.Setup
--console series-s,scripts/play.ps1defaults plus the fiveVICTORY_PORT_*=1, warm pipeline cache.cd8dfc0+ #354 (4ad8527) + a local patch onport_descriptors.rsanddescriptor.rs. The patch only adds counters. Which slots are made, and how, is unchanged.the first frame of 500 draws or moretowindow closed. 262.8 s, 3,893 frames by the frame counter, median 15.15 fps. No ERROR, panic or device removal.What the patch counts
record()writes 12 bytes:[VIEW_TAG, i, generation](descriptor.rs:1461). For placed and constant views, words 1-2 hold an address payload and the kind instead.VIEW_TAG(descriptor.rs:541-543).missed(), after the existingmarked()check, a view whose key equals the last one counts as "same head" and returns. Everything else reachesCHECKED[1],MISSED_ALL,WRITERSand the WARN as before. Keys start at 0, meaning "not seen yet", so a head port 2 sees for the first time also counts as changed.faulted()also stores the fault address per 64 KiB block. A missed record counts as "exact" when the latest opening fault of its block fell inside its 12-byte head.copied()), each copy into the heap is sorted by where it starts in its 32-byte slot. For copies that start mid-slot, it also counts those whose slot hasVIEW_TAGin word 0 after the copy.Results
Per-line values are medians of the port 2 lines in the window. Since-start values are the counter deltas over the window divided by 3,893 frames.
VIEW_TAGin word 0 after the copy0x7ffc69f3c2ca(not the title's)What I read from it
~98.4% of what port 2 has been counting as missed view records keep the same head. This is 525,737 of 534,081 over the window. Their 12-byte head equals the one port 2 last saw in that slot, and only bytes 12..31 changed.
mirror()reads only bytes 0..11, so remaking such a view makes the same view again. It is lock-free when the host slot was made at once from that key (host.rs:3282-3288).their writerslist and the WARN lines are built on these same-head records, so they overstate what port 2 misses by ~64x (534,081 / 8,344).The memcpy/memmove hook has not marked a single record in any of my runs. It is bound and called: it sees ~2,900 copies into the heap a frame.
MARKSmap are the ones the stubs and the fallback use, so this is not a stride bug.memcpywas among the last writers of the blocks. That list keeps one writer per 64 KiB block and says nothing about the record itself.0x7ffc69f3c26f) falls inside System32VCRUNTIME140.dll. The DLL's base is0x7ffc69f20000, and itsmemcpyexport at +0x1f020 jumps to +0x1c010. The entries at +0x1c141..+0x1c2ca are in that routine.title+0x18849c, at 3,744 against 1,414 at the end of the window.The ~2 changed heads per frame do not look like new
record()writes. 29 WARN lines in the run carryold_key/new_key; 27 fall in the window. They are the first 20 plus powers of two, so the sample is front-loaded. In 21 of the 27 window lines the old head is a placed or constant view, where words 1-2 are an address payload. In those 27 lines:0x804eab000fbfc280→0x804eab0000000000.0x1000016fc→0xe55ffe8000016fc.What the current code makes of them:
constant_ofaccepts any words, andplaced_ofonly checks that the shape number exists.view_atfails and the slot is nulled.Suggestions
changed_records/safecopy::changedreport a head change themselves, since they overwrite the last-seen copy as they compare. Either way,view records missed,their writersand the WARN would then mean what they say.record()call could have written?view_at/constant_of/placed_ofcannot tell that from the head alone, so it would need another signal.I can open a PR against a-publier with the counting change and the counters, if that helps.
Not tested
github-bot referenced this issue2026-11-27 10:41:03 +00:00