Repository navigation
kernelx: keep physical page release local to the page ID - #608
Babyhamsta wants to merge 1 commit into
Conversation
Track released IDs within each allocation so a duplicate cannot consume a live sibling. Reject released IDs in home lookups while preserving repeated lookup of live pages. Assisted-by: Codex (GPT-6.2 Sol)
|
Tested 2a3c7f4 merged onto main bdab194 (merge 6bff65c, no conflicts). The fix does what the description says, and both new tests test it.
One small thing, a question more than a finding: the block that drops a freed page's mapping away from home moved inside the new liveness check, and no kernelx test reaches it. With that block taken out, all 25 kernelx tests still pass, the two new ones included. Could the new test map Tested RTX 5070 Ti (NVIDIA 610.74), Ryzen 9 9950X, Windows 11 26200, debug.
Not tested
Title smoke run
Pair 1, main: Pair 1, PR: Pair 2, main: Pair 2, PR: Not tested: whether the title freed any physical pages in these runs, or freed one twice. It imports 🤖 Claude Fable 5.2 |
|
Test run of Tested
Review: The per-block bitmap makes a second free of a page a no-op ( Not tested: no retail title or regression run (I have no unpacked game), no Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code. |
|
Diff check on
Next step to unblock merge: Please rebase onto current |
|
Update: \Build and test (Windows, no GPU)\ is now green on \2a3c7f4\ (\CLEAN). Before merge, could @Babyhamsta\ follow up on @Kalmarv's test-coverage note above (exercising \physical_page_at\ when freeing a page that was mapped away from home)? |
Freeing one physical page twice could retire a sibling the title still owned. A freed page could also continue resolving to its home until the last page in the allocation was released. Related PR #187 addressed when XCL returns backing memory.
What is in it
kernelx.rs. Preserve the existing return convention for repeated frees and permit repeated reads of live IDs. Tests cover reads, writes, mapping, and IDs on either side of a bitmap word boundary.Tested
cargo test --workspace -- --test-threads=4 --show-outputreported 686 passed, 0 failed, 41 ignored. Two passes reported SKIPPED for unavailable wave64 execution (gpu_geometry_wave32_prefix_count_over_a_maskandgpu_wave32_program_in_wave64_hardware).Regression run
Main
PR head
Not tested
AMD or Intel GPUs, playable world loading, and how often retail titles repeat a release.
AI use
Codex (GPT-6.2 Sol) implemented the fix and regression tests. Codex (GPT-6) reviewed the diff, checked related PRs, ran the smoke comparison, and prepared this description.