Repository navigation
[rocjitsu] Add intrusive shared ownership utilities and migrate consumers - #14539
Merged
Merged
Conversation
✅ All Checks Passed — Ready for Review
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
|
🎉 All checks passed! This PR is ready for review. |
Signed-off-by: Ian Wood <ianwood@u.northwestern.edu>
IanWood1
force-pushed
the
users/IanWood1/intrusive-shared-ptr-20261027
branch
from
October 29, 2026 06:31
11543fb to
3f34d61
Compare
Signed-off-by: Ian Wood <ianwood@u.northwestern.edu>
Signed-off-by: Ian Wood <ianwood@u.northwestern.edu>
kuhar
reviewed
Oct 29, 2026
kuhar
reviewed
Oct 29, 2026
kuhar
left a comment
Member
There was a problem hiding this comment.
One comment, plus 2 inline replies
Keep ownership hooks private and provide consistent read-only count queries across storage helpers. Share the VM mutation-epoch alias across producers, consumers, and tests, and clarify helper documentation and test naming. Signed-off-by: Ian Wood <ianwood@u.northwestern.edu>
Reject invalid forwarding arguments and wrapper self-copy construction so deleted special members remain meaningful. Keep counter placement access inside tests and isolate the shared epoch type from the VM registry. Signed-off-by: Ian Wood <ianwood@u.northwestern.edu>
kuhar
approved these changes
Nov 3, 2026
Compare shared handles directly in restored SGPR analysis, including const handles, with tests distinguishing ownership identity from equal values. Keep implementation friends private and epoch rationale with its documentation. Signed-off-by: Ian Wood <ianwood@u.northwestern.edu>
Contributor
rocjitsu post-commit fuzz passedThe 32-worker multiplexer campaigns for commit
|
Contributor
TheRock Submodule Bump ActivityNewest first
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Give shared VM snapshots and page-policy epochs explicit control over reference-count placement to avoid false sharing. Also support shared ownership without atomic counting when ownership stays within one analysis invocation.
Technical Details
Add
IntrusiveSharedPtr<T>with strong ownership and no weak ownership. Object-providedadd_ref()andrelease_ref()hooks determine counting and thread safety. Provide three storage helpers in the same header:RefCounted<T>for compact storage with atomic reference counting.RefCountedCacheAligned<T>to isolate the value from its atomic counter.RefCountedNonAtomic<T>for ownership confined to one thread or externally synchronized across all handles sharing the object.Use the aligned helper for shared
GpuVmAccesssnapshots and the page-table mutation epoch, replacing their ad hoc alignment. Preserve ordinary snapshot value copies and epoch invalidation ordering.Use the non-atomic helper for
RestoredSgprFactsin indirect-branch analysis. Its backing vector is shared only among local flow states within one synchronous analysis invocation. Preserve copy-on-write detachment before mutation, including when sibling branches share restored register facts.Issue Tracking
Related to #10852.