kernel: share the address-space lock for transient protection changes #1149
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
GPU
GUI
help wanted
question
Shaders
Video
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/KytyPS5--KytyPS5!1149
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1149/head"
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?
@abokhalill on GitHub · 2026-10-07 16:10 UTC · original
abokhalill:shared-transient-protect→main· +8 −4 · 2 files · 1 commits · closed without mergingEvery guest write to GPU-tracked memory faults, and the fault handler changes the page's protection through
GuestAddressSpace::ProtectTransient. That takes the address space's mutex exclusively, so faults from different threads wait on each other even though they only read the mapping list (#1081).This PR takes the mutex shared in
ProtectTransientand the read-only ownership queries. Anything that changes the mappings still takes it exclusively.Windows, N threads each writing 400 tracked pages per frame:
@coderabbitai[bot] on GitHub · 2026-10-07 16:15 UTC · original
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
5ab2ce6a-9540-414d-99cc-3498903274f7📥 Commits
Reviewing files that changed from the base of the PR and between
d2413fc2eband21840b49a5.📒 Files selected for processing (2)
src/kernel/memory.cppsrc/kernel/memoryAddressSpace.incIncluded review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 5 remain after this review.
📝 Walkthrough
Walkthrough
GuestAddressSpacenow uses a shared mutex.Owns,OverlapsOwned, andProtectTransientacquire shared locks.memory.cppincludes<shared_mutex>.Suggested reviewers:
nmzikPriority: ➖ Normal
Change: Refactor
Merge Risk: ⚪ Minimal · up to
21840The shared-lock change has no established overlapping-protection risk in its production call path and is ready to merge after normal checks.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
Comment
@coderabbitai helpto get the list of available commands.Pull request closed