On 05/10/2026 21.37, Stefano Brivio wrote: > Bernard, thanks for the investigation and for the patch. Just one doubt: [...] > I'm a bit worried we might cause unnecessary setsockopt() calls in some > corner cases if we go this way, even though it's a rather minor concern > (we just called splice(), and that setsockopt() is not _that_ expensive > in comparison). The 'corked' variable should ensure that we only add the setsockopt when it would otherwise add the unneccesary 200ms delay. I attached the reproducers and benchmarking tools. The finding from running it was that SPLICE_F_MORE gives plenty extra performance even for 8K pipes and setsockopt hardly costs anything. To test: # maybe with adjustment to /proc/sys/fs/pipe-user-pages-soft pasta --config-net -t 127.0.0.1/25432:15432 -- python3 rr.py serve 15432 python3 rr.py 25432 ┌─────────┬─────────┬───────────────┬─────────────────┬────────────────┐ │ Build │ Pipes │ Worst latency │ Upload (Gbit/s) │ Download/Gbit │ ├─────────┼─────────┼───────────────┼─────────────────┼────────────────┤ │ base │ 8 KiB │ 208 ms │ 89–91 │ 87–89 │ ├─────────┼─────────┼───────────────┼─────────────────┼────────────────┤ │ patched │ 8 KiB │ 0.1 ms │ 88–89 │ 86–89 │ ├─────────┼─────────┼───────────────┼─────────────────┼────────────────┤ │ nomore │ 8 KiB │ 0.1 ms │ 42–43 │ 40 │ ├─────────┼─────────┼───────────────┼─────────────────┼────────────────┤ │ base │ default │ 0.3 ms │ 203–204 │ 189–198 │ ├─────────┼─────────┼───────────────┼─────────────────┼────────────────┤ │ patched │ default │ 0.1 ms │ 203–205 │ 185–190 │ ├─────────┼─────────┼───────────────┼─────────────────┼────────────────┤ │ nomore │ default │ 0.1 ms │ 193–203 │ 177–190 │ └─────────┴─────────┴───────────────┴─────────────────┴────────────────┘ Ciao Bernhard M.