Sampled slots: intersect readback marks with evicted indices before queueing wakes #3129

Open
Heldenkrieger01 wants to merge 1 commit from upstream-pr/3129 into main
Heldenkrieger01 commented 2026-11-29 20:10:10 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Heldenkrieger01 on 2026-11-29T20:10:10Z.


Related to #2608, which changes readback timing and queue priority. This reduces work per completed sweep when many marks and few wakeable slots intersect. Every sampled slot still gets its last-seen stamp. The eviction bitset and map share a lock so a matching index queues all its heaps.

Synthetic CPU benchmark, 1,048,576 slots, eight matching evictions, median of 31 timed sweeps after four warmups. Dense marks went from 4.02 ms to 1.31 ms. With 128 marks the extra scan raised the time from 23.9 µs to 53.5 µs. Frame rate was unmeasured.

All three sampled tests passed in an isolated rustc harness. Staged asset policy passed. The Windows GNU crate test executable built but exited with STATUS_ACCESS_VIOLATION even on --list.

Reviewed with sol-loop: 2 rounds with GPT-6.2-Sol. Sol verdict: approved.

Created with GPT-6.2-Astra in the Codex harness.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5554633057 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3129). Originally posted by [Heldenkrieger01](https://github.com/Heldenkrieger01) on 2026-11-29T20:10:10Z. --- Related to #2608, which changes readback timing and queue priority. This reduces work per completed sweep when many marks and few wakeable slots intersect. Every sampled slot still gets its last-seen stamp. The eviction bitset and map share a lock so a matching index queues all its heaps. Synthetic CPU benchmark, 1,048,576 slots, eight matching evictions, median of 31 timed sweeps after four warmups. Dense marks went from 4.02 ms to 1.31 ms. With 128 marks the extra scan raised the time from 23.9 µs to 53.5 µs. Frame rate was unmeasured. All three sampled tests passed in an isolated rustc harness. Staged asset policy passed. The Windows GNU crate test executable built but exited with STATUS_ACCESS_VIOLATION even on --list. Reviewed with sol-loop: 2 rounds with GPT-6.2-Sol. Sol verdict: approved. Created with GPT-6.2-Astra in the Codex harness.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/3129:upstream-pr/3129'
git switch 'upstream-pr/3129'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/3129'
git switch 'upstream-pr/3129'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/3129'
git switch 'upstream-pr/3129'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/3129'
git switch 'main'
git merge --squash 'upstream-pr/3129'
git switch 'main'
git merge --ff-only 'upstream-pr/3129'
git switch 'main'
git merge 'upstream-pr/3129'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
trustno1-coder/VIctory-NVIDIA!3129
No description provided.