Skip to content

uucore: splice fast-path for head -c & preliminary for dd, tail, split#11844

Merged
cakebaker merged 3 commits intouutils:mainfrom
oech3:splice-n
Apr 21, 2026
Merged

uucore: splice fast-path for head -c & preliminary for dd, tail, split#11844
cakebaker merged 3 commits intouutils:mainfrom
oech3:splice-n

Conversation

@oech3
Copy link
Copy Markdown
Contributor

@oech3 oech3 commented Apr 15, 2026

Closes #11843 Closes #11620 Fixes #11777
This should help achieving same perf with

$ cat /tmp/huge|pv>/dev/null
^C.8GiB 0:00:01 [35.8GiB/s]

at 3 utils in the future.

@oech3 oech3 force-pushed the splice-n branch 4 times, most recently from 778ff1a to 08af0e0 Compare April 15, 2026 21:08
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 15, 2026

GNU testsuite comparison:

Skipping an intermittent issue tests/cut/bounded-memory (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/tail/inotify-dir-recreate (passes in this run but fails in the 'main' branch)
Note: The gnu test tests/expand/bounded-memory is now being skipped but was previously passing.

@oech3 oech3 marked this pull request as ready for review April 15, 2026 21:36
@oech3

This comment was marked as resolved.

@oech3 oech3 force-pushed the splice-n branch 3 times, most recently from a70c6cf to eff6fd9 Compare April 16, 2026 07:41
@oech3

This comment was marked as resolved.

@oech3 oech3 force-pushed the splice-n branch 2 times, most recently from 4927a50 to 5139f43 Compare April 16, 2026 08:18
@oech3 oech3 force-pushed the splice-n branch 4 times, most recently from 5303748 to c95b777 Compare April 19, 2026 09:50
@oech3

This comment was marked as resolved.

@oech3

This comment was marked as resolved.

Comment thread src/uucore/src/lib/features/pipes.rs Outdated
@cakebaker
Copy link
Copy Markdown
Contributor

Was reviewer's comment removed?

I removed the original comment as the selected region was incorrect.

@oech3
Copy link
Copy Markdown
Contributor Author

oech3 commented Apr 20, 2026

Many CI down

@cakebaker cakebaker merged commit df7ae35 into uutils:main Apr 21, 2026
169 checks passed
@cakebaker
Copy link
Copy Markdown
Contributor

Thanks!

@oech3 oech3 deleted the splice-n branch April 21, 2026 09:07
@oech3
Copy link
Copy Markdown
Contributor Author

oech3 commented Apr 21, 2026

$ truncate -s 1PB /tmp/huge
$ head -c 1PB /tmp/huge | pv>/dev/null
^C.4GiB 0:00:01 [39.4GiB/s]
$ gnu9.11/head -c 1PB /tmp/huge | pv>/dev/null
^C49GiB 0:00:02 [2.26GiB/s]

I'm not sure how to utilize it at general scripting.
I'm currently doing run0 sh -c "cat *.iso > /dev/sdbN" since uutils/dd does not splice() yet.

@oech3
Copy link
Copy Markdown
Contributor Author

oech3 commented Apr 21, 2026

(Also I'm waiting #11458)

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.

uucore, head, tail, dd, split: Introduce a function to splice() N bytes via broker pipe head -c is incorrect with FUSE fs with fake stat

2 participants