Skip to content

tee: own page caches using memfd for 2+ outputs - #15854

Open
oech3 wants to merge 1 commit into
uutils:mainfrom
oech3:tee-memfd
Open

oech3 wants to merge 1 commit into
uutils:mainfrom
oech3:tee-memfd

Conversation

@oech3

@oech3 oech3 commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Closes #15803 .
Note that this causes large performance drop:

> yes|tee /dev/null|pv>/dev/null
 133GiB 0:00:02 [66.8GiB/s]
> yes|tee-memfd /dev/null|pv>/dev/null
17.7GiB 0:00:02 [8.86GiB/s]
> yes|tee-rw /dev/null|pv>/dev/null
10.1GiB 0:00:02 [5.09GiB/s]

@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

GNU testsuite comparison:

GNU test failed: tests/tee/tee. tests/tee/tee is passing on 'main'. Maybe you have to rebase?

@oech3
oech3 force-pushed the tee-memfd branch 4 times, most recently from 5681e0d to e0a00ac Compare October 26, 2026 04:24
@oech3

oech3 commented Oct 26, 2026

Copy link
Copy Markdown
Contributor Author

We were bypassing (thus, incorrectly passing) write-eagain.sh. Reviewer can ignore it. Needs investigation for tee.sh.

@oech3
oech3 marked this pull request as draft October 26, 2026 04:36
@oech3 oech3 changed the title tee: restrict fast-path to 1 output tee: own page caches using memfd for 2+ outputs Oct 26, 2026
@oech3
oech3 force-pushed the tee-memfd branch 8 times, most recently from 934d157 to 40d7a1c Compare October 26, 2026 08:32
@oech3
oech3 force-pushed the tee-memfd branch 3 times, most recently from 77d41f4 to b860187 Compare October 26, 2026 09:46
@oech3
oech3 marked this pull request as ready for review October 26, 2026 09:46
Comment thread tests/by-util/test_tee.rs
}

#[test]
#[ignore = "this test was made when we were not using memfd which accidentally gets EFBIG. Needed to rewrite to exclude memfd."]

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@abendrothj Is there any way to exclude memfd from rlimit?

This branch has not been deployed

No deployments
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.

tee: zero-copy lets stdout and FILE differ if input changes after tee exits

1 participant