Skip to content

pipes:rs: replace unnecessary splice by read-ahead hint#12548

Merged
cakebaker merged 1 commit into
uutils:mainfrom
oech3:reuse-fcntl
Jun 1, 2026
Merged

pipes:rs: replace unnecessary splice by read-ahead hint#12548
cakebaker merged 1 commit into
uutils:mainfrom
oech3:reuse-fcntl

Conversation

@oech3
Copy link
Copy Markdown
Contributor

@oech3 oech3 commented Jun 1, 2026

  • drop 2 pub
  • dedup 2 fcntl()s and reuse it as a hint to bypass splice without broker
  • read ahead for splice (1st splice is slower than 2nd splice since page caches are mising)
  • remove 2 splices from splice_unbounded as the hints are enough

dropping cache by echo 1 | run0 tee /proc/sys/vm/drop_caches fails on hyperfine

$ time target/release/cat-nofadv /lib/chromium/chromium>/dev/null
Executed in  284.67 millis    fish           external
$ time target/release/cat-fadv /lib/chromium/chromium>/dev/null
Executed in  272.77 millis    fish           external

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

GNU testsuite comparison:

Skip an intermittent issue tests/date/date-locale-hour (fails in this run but passes in the 'main' branch)
Congrats! The gnu test tests/head/head-write-error is no longer failing!
Congrats! The gnu test tests/cut/bounded-memory is now passing!
Congrats! The gnu test tests/printf/printf-surprise is now passing!

@oech3 oech3 marked this pull request as ready for review June 1, 2026 04:30
Comment thread src/uucore/src/lib/features/pipes.rs Outdated
@oech3 oech3 marked this pull request as draft June 1, 2026 09:06
@oech3 oech3 requested a review from cakebaker June 1, 2026 09:14
@oech3 oech3 marked this pull request as ready for review June 1, 2026 09:14
Comment thread src/uucore/src/lib/features/pipes.rs
@oech3 oech3 requested a review from cakebaker June 1, 2026 11:21
@cakebaker cakebaker merged commit 10ef28d into uutils:main Jun 1, 2026
171 of 172 checks passed
@cakebaker
Copy link
Copy Markdown
Contributor

Thanks!

@oech3 oech3 deleted the reuse-fcntl branch June 1, 2026 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants