GPU: bound split write-watch retries to their merged range #2854

Merged
ghptc merged 1 commit from upstream-pr/2854 into main 2026-11-29 22:54:42 +00:00
ghptc commented 2026-11-29 18:11:40 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by ghptc on 2026-11-29T18:11:40Z.


When a coalesced write-watch probe crosses a reservation boundary, ask_rest retries the pieces inside that group. The fallback scanned every piece for every rejected group, then searched all previously accepted ranges for every retry.

Restrict the search to the sorted pieces in the current group. A previous successful probe contains the current piece exactly when its end covers the current end, since starts are sorted and merged groups are disjoint. Advance that end only on success. Probe order, the reset flag, locks and write epochs are preserved. #1676 used a maximum accepted end in a related write-watch implementation.

An isolated Win64 control under Proton exercised 128 pairs of adjacent watched and unwatched reservations with writes before each arm. The two loops produced the same 896 kernel probes, 640 refusals, accepted intervals and dirty pages. Median time over 16 alternating pairs was 364.7 to 285.7 µs, with P95 367.2 to 288.0 µs. A second control compared destructive mock probes over 400 generated layouts, including failures followed by overlapping retries. The probe traces and returned data matched. The real workload frequency of this fallback is unmeasured.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5553609881 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2854). Originally posted by [ghptc](https://github.com/ghptc) on 2026-11-29T18:11:40Z. --- When a coalesced write-watch probe crosses a reservation boundary, `ask_rest` retries the pieces inside that group. The fallback scanned every piece for every rejected group, then searched all previously accepted ranges for every retry. Restrict the search to the sorted pieces in the current group. A previous successful probe contains the current piece exactly when its end covers the current end, since starts are sorted and merged groups are disjoint. Advance that end only on success. Probe order, the reset flag, locks and write epochs are preserved. #1676 used a maximum accepted end in a related write-watch implementation. An isolated Win64 control under Proton exercised 128 pairs of adjacent watched and unwatched reservations with writes before each arm. The two loops produced the same 896 kernel probes, 640 refusals, accepted intervals and dirty pages. Median time over 16 alternating pairs was 364.7 to 285.7 µs, with P95 367.2 to 288.0 µs. A second control compared destructive mock probes over 400 generated layouts, including failures followed by overlapping retries. The probe traces and returned data matched. The real workload frequency of this fallback is unmeasured.
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!2854
No description provided.