Repository navigation
Conversation
…ir operations with IOSQE_FIXED_FILE
This was referenced Nov 16, 2026
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.
Experiment 4 of the TUring write-path series (draft, for measurement; the owner decides).
Problem
In the rpi5 profile on master 85489f0,
fget+fputper SQE are the largest uring-only item: 10.4% / 6.6% / 12.9% of the cycles (546 / 219 / 553 cycles/hop) on single N=1024 / N=16 / chain100. epoll has nothing like it;fdgetin a single-threaded process takes no reference.Change
TUring::Register(fd)puts the file into its slot,io_uring_register_files_update.TPollerDrivenSocketalready calledRegister().TPollerDrivenFileHandlenow callsRegisterFile()when the poller has it; only TUring has it, so TIOCp does not change.IOSQE_FIXED_FILE; the slot is the descriptor number.PrepClose()frees the slot withclose_direct.close_direct→close, all HARDLINK. The cancel by fd also matches fixed-file requests, because it compares files.close_directand thenclose.TUringusers that never callRegister()are not affected.Tests
test_uring_registered_file_closed: closing a registered pipe end through the handle gives the reader EOF, and the next file with the same number gets its own slot. Without theclose_directit fails (the reader never sees the end).test_uring_close_cancels_only_its_operations(cancel by fd of fixed-file requests) andtest_uring_closes_on_small_queues(it caught the 2-entry SQ).A/B (rpi5)
rpi5 (Cortex-A76, Linux 7.3.0-1003-raspi, liburing 2.15, GCC 15.3), Release,
examples/benchontaskset -c 3, withrun_ab.sh. Median (min-max) of 7 repetitions for single N=1024 and of 5 for N=16 and chain100 (-n 1024 -a 100). Cycles/hop = cycles:u + cycles:k of-w 100000minus-w 100.Run 2: master 85489f0, #214 608f9e8 (deferred task work), #215 51879eb (fixed files), #214 + #215 dbf3d2b, #214 + #213 eebf0d1 (direct write). Same method; heads alternate in each repetition.
Local actor bench (
ping_actors, 4 nodes, inflight 1024, 10M messages, 5 repetitions, timeout 60 s per run), msg/s, median (min-max), no hangs:The actor bench does not tell the heads apart: they are all within each other's spread.
This PR alone: 0.989 / 0.960 / 0.936 of master. Stacked on #214: 0.932 / 0.876 / 0.937 (#216).
fget/fputshare of the profile: part of that share is the first cache miss onstruct file, which moves to the next access.Checks
test_uring*19/19.