perf: credit announced shadow writes with independent freshness validation #652
No reviewers
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/lobomfz--VIctory-xmem!652
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-652"
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?
@tommiehansen on GitHub · 2026-12-06 00:14 UTC · original
tommiehansen:perf/phase13-announced-shadow-feed-20261206→main· +387 −9 · 4 files · 6 commits · draftWhy
Streaming CPU writes into watched GPU-local shadow replicas may trigger a later redundant refresh even when the bytes have already been captured for upload. Avoiding that duplicate work could reduce refresh traffic, but an independent CPU writer can invalidate a previously captured snapshot.
What changes
Opt-in
VICTORY_ANNOUNCED_SHADOW_COPY=1credits only complete successfully captured pages of watched ordinary GPU-local replicas. Exclude GPU-owned changes-only copies and recheck kernel write-watch before consuming a credited snapshot. Retain the original refresh fallback. Inspired by CNF/Larp heapfeed; no copied source.Benchmark results — exactness and traffic accounting
CI 47585779021,
deebb254, both configurations passed including independent late CPU writer.Credited bytes are accounting, not measured avoided transfer time. Preparation, submission and net refresh costs have not yet been quantified.
Why this should be merged
A narrow freshness-checked credit mechanism could avoid redundant refresh work without changing GPU ownership semantics. Keep draft pending alias, failure, lifetime and concurrency controls and a paired net-cost comparison.
Validation and compatibility
Run the exact off/on WARP workflow at the pinned revision above. The late writer must be observed in both arms. Request real streaming traces, refresh byte counts, complete preparation/submission timings and physical AMD validation. This is separate from the broader semantic heap generation architecture and is not a complete streaming redesign.
Current revision
878ee0cSerialize opt-in pending-credit capture and consumption per shadow through freshness recheck and copying; leave the disabled path free of the new mutex. Reject partial ranges with no complete page before write-watch work. Added exact overlapping-replica readback, unavailable-watch fallback, dropped external owners and late-writer controls, plus 96 paired ABBA/BAAB rows measuring preparation, submission, credited bytes and actual refresh bytes. Overlapping replicas are not a physical alias-mapping test. Current-head CI 47589329686 is pending; prior results above are historical.
Verified paired net-cost results
CI 47589329686 passed both jobs at
878ee0c, including 96 exact paired rows, overlapping replicas, unavailable-watch fallback, dropped owners and late writers. Times are medians of block medians; paired percentages use block-level ratios.The full-page capture removes duplicate CPU refresh traffic, but does not demonstrate a net speedup or fewer GPU upload bytes. Keep draft and disabled: full coverage regresses. Physical alias and AMD streaming evidence remain open.
Warm-replica upload accounting
Current head
8c0b33dinitializes and verifies GPU replica content before each timed update. It captures the actual existing Host::card_before logical upload-byte and range counters alongside CPU refresh/credit counts and timing. This excludes initial upload from timed accounting and adds no production synchronization. CI 47592106870 is running. Logical GPU upload bytes are not measured PCIe bus traffic.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.