Repository navigation
Conversation
|
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.
|
|
Rebase handoff — rebased onto current
Verified on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release, To pick it up: Head is |
|
The new |
8cbb8cc to
0906066
Compare
0906066 to
8c9e2b2
Compare
|
For whoever picks up the rebase Dean asked for on 27 Oct: I merged Code conflicts are small:
The debt file is the real work: 940 commits on On that merge: WSL2 Ubuntu 22.04 (GCC 11.4.0) and Windows 11 Pro 26300 (WinLibs GCC 15.2.0 r7), both Release. The The game threads that hit this message (Java 25 Networking, EA SPORTS FC 25 and FC 27) were fixed by #5973 and #6343, the pipe and standard-input cases. What is left is the homebrew import count in #7971 (four titles import AI-assisted: yes (Claude Code) |
8c9e2b2 to
f4155dd
Compare
|
@inmert @adriadam10 Two things block this after main moved. On Windows, Udp.cpp WaitAny now slices only for FILE_TYPE_PIPE, but main's Windows EV_CLEAR edge watch (EdgeWatch.cpp:89) waits on a dummy descriptor INT_MAX and relies on that slicing; _get_osfhandle(INT_MAX) also hits the invalid parameter handler. Could you keep slicing for any descriptor that is not a regular file or directory? Second, PollFileRead calls sceKernelLseek under the equeue mutex, and on Windows that waits for the descriptor's position lock during a read or write. #9099 moved the same measurement outside the lock with MeasureFiles; could the kevent read event reuse it? The debt file then needs a rebase, and the new entry should drop "still refuse non-socket descriptors" and "as on sockets and pipes", which main no longer matches. |
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
Nothing blocks this change; the review is complete for all included changed files, and the inspected code supports merging.
What I ran
Reviewed head f4155ddf0711db1cb09dd64459065c46ac6dbe8e using repo_read.py to read the prepared diff and targeted repository source. No build or test commands were run. The author reports Linux tests and a conventions check in the PR description; these were not run by me.
Results
| Check | Result | Note |
|---|---|---|
| Diff and targeted source review | passed | All six changed files read |
| Build and tests | not run | Author-reported results only |
Findings
Blocking
None.
Non-blocking
None.
Not verified
The six changed files listed as reviewed in manifest.json were read: Equeue.hpp, FileEvent.cpp, Kqueue.cpp, Udp.cpp, GuestKqueue.cpp, and docs/dev/debt/libkernel.md. files.json was not available through the reader, so excluded-file details were not verified. Windows, macOS, console, and title behavior were not verified; no build or tests were run. Author-reported Linux test results are in description.md.
To get this to a good state
Nothing is required.
|
I am closing this for now. The review asked for a rebase and for the new test line that pins the unimplemented EV_CLEAR throw on a regular file to be dropped, and there has been no push since 28 Oct. The branch also conflicts with main, and the GuestSockets::WaitAny change needs a fresh read on the rebased head. You are welcome to reopen or push a rebased branch at any time and we will look again. |
What
keventthrew forEVFILT_READandEVFILT_WRITEon a regular file:Both now follow FreeBSD 11's
vfs_kqfilter,filt_vfsreadandfilt_vfswrite, from the same commit the kqueue debt entry already links. A read event reports the file size minus the descriptor's offset (negative past the end) and fires when that is not zero, or always withNOTE_FILE_POLL.NOTE_LOWATanddataare ignored, and adding the event again replaces itsfflags, askqueue_registerdoes for a filter withoutf_touch. A write event always fires withdata0. Size and offset come fromsceKernelFstatandsceKernelLseek, so files served fromapp0.zarwork as well.A waiting
keventis woken by the host watchEVFILT_VNODEalready uses, so a write from another descriptor or process wakes it. Files fromapp0.zarnever change and get no watch.GuestSockets::WaitAnyalso needed a change. It passed every interest that is not a socket toppoll, and the host reports a regular file (and the null device behind an archived file) ready at once, so akeventwaiting on a file at its end spun on the CPU. It now passes only pipes to the host, and on Windows the 1 ms pipe slicing is only turned on when a pipe is actually in the set.EV_CLEARon a regular file still throws, as it does on sockets and pipes, and so do directories (theirva_sizeis not modelled) and the other descriptor types. The debt entry also notes the one difference I know of: the event is re-evaluated at every scan, so after reading to the end a seek back is reported straight away, where FreeBSD waits for the next write, truncation or attribute change.Overlap: #7075 changes the same line of
WaitAny. I used itsinterest.write ? WriteMask : ReadMaskthere, so whichever lands second only rebases that line. #7049 changes the lines next to mine inModifyKnote; the two don't interact. #7092 (NOTE_LOWATon sockets) conflicts inModifyKnoteand in the kqueue debt sentence (git merge-treeof the two heads). They don't clash in behaviour: itsDescriptorLowWateronly applies to sockets, and a regular file ignores the mark asfilt_vfsreaddoes, so the resolution is to keep itsDescriptorLowWatercall in place of my!fileguard, and to keep both edits to the debt sentence. #6343 (descriptor 0) touches the same branch ofAddDescriptorKnote; with this PR a stdin redirected from a regular file takes the new path, which is what FreeBSD does too.Tested
Ubuntu 24.04, GCC 13.3.0, Release, on
mainca82d7d88.RegularFilecase inguest_kqueue:datain the middle and at the end of the file, negativedatapast the end,NOTE_FILE_POLLturned on and off by adding the event again,NOTE_LOWATignored, a blockingkeventwoken by a write through a second descriptor 50 ms later, a truncation,EV_CLEARthrowing, the write event, and the events going away on close. It aborts onmainwith the error above and passes with this change.WaitAnychange the test still passes, but takes about 80 ms of CPU instead of 10 ms (/usr/bin/time, 3 runs each) because the 50 ms wait spins.guest_equeue_events,guest_kqueue,guest_poll,guest_select,guest_select_wait, theguest_socket_*tests,guest_tcp,guest_udp,guest_sce_net, theguest_rudp_*tests andguest_net_ctl: 22/22 pass.python3 tools/check_conventions.py --base origin/mainpasses.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)