Repository navigation
fix(libc): defer resident alias demotion during host writes - #6264
Conversation
|
Additional local validation: I cross-compiled |
aa8708f to
312170c
Compare
|
After rebasing onto current main, I rebuilt |
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
Retain Pipodi safety guard from closed PR5851 without its resident alias expansion or automatic AGC alias routing. Main still refuses aliases over partial resident runs. Five unmodified-main regression runs fail before this guard; positive validation pending. Fork proposal only; no duplicate upstream PR intended. (cherry picked from commit 078a574)
Retain the regression originally supplied by Pipodi in closed PR5851 (2209141), adapted here through e1c6af6. Current-main-equivalent libc/kernel source returns an alias during the open HostWrite and fails this assertion five times. This test is a reproduction, not a new implementation or an upstream PR. (cherry picked from commit 312170c)
312170c to
50748f7
Compare
|
Rebased the two focused commits onto current main and removed the unrelated draw-pipelining history. The change remains the host-write guard plus its regression test, with original commit authorship preserved. Linux Release build and conventions pass; the |
|
The guard looks right for |
|
Addressed in Validation: |
|
Thanks, the early Before merging I'd like one Windows title run on |
|
Good catch. |
|
Windows run for @oneandonlydean's request, on Windows 11 Pro 26220, NVIDIA RTX 4070 (596.21), Ryzen 7 5700X, MinGW GCC 15.2. PR head
Title runs, 120 s each, main vs this PR:
Whether the alias path was reached: it was not. I added temporary counters in a local build only; they are not part of this PR. They count
So these runs show no regression in two networked titles, but they do not exercise the case you asked about (an alias import refused while a blocking receive holds a host write open). I don't have a local title that reaches it. The code matches your churn note: the overlap retirement and LRU eviction run before the alias attempt. I could not measure that churn here. Not checked: a title that hits the alias path, Linux, the Written with Claude Code assistance (validation by a subagent, reviewed in this session). |
|
Thanks for running both networked titles and instrumenting whether the alias path was reached. The 0-call / 0-decline result makes the limit clear: these runs are useful non-regression checks, but they do not exercise the open-HostWrite refusal or measure the repeated retirement/eviction churn. The requested alias-path title validation remains outstanding; I will not describe these runs as covering it. |
|
Thanks for the follow-up. I checked the current path against the existing regression and the Windows title report. The |
What
Fixes #6260.
MapAliasdeclines a resident direct-memory run when any page in that run has an openHostWrite. It returns immediately rather than waiting, since host writes such as socket receives can block. The guest-memory test checks that an alias is refused while the write is open, then succeeds after the write closes and preserves both pages' data.The production guard and regression test retain Romans Pokrovskis's original authorship; the test also retains Pipodi's original regression credit. This change does not include #5851's resident alias expansion or automatic AGC alias routing.
Tested
guest_memory_tests,libc.prx, andlibkernel.prxcompleted.python3 tools/check_conventions.py --base upstream/mainpassed.git diff upstream/main...HEAD --checkpassed.guest_memorytest cannot run on this Linux host: its CPU lacks LZCNT, BMI1/2, MOVBE, AVX2, and FMA. The issue records five failing runs against main and five passing runs with the guard on Windows 11; those remain the runtime evidence.Checklist