Thread (9 messages) flat view 9 messages, 6 authors, 2026-02-20

Re: [PATCH] copy.c: use `sendfile()` for in-kernel file copying on Linux

From: Collin Funk <hidden>
Date: 2026-02-20 16:48:58

Ed Maste [off-list ref] writes:
On Sat, 14 Feb 2026 at 11:50, Chris Torek [off-list ref] wrote:
quoted
Ah, more importantly, FreeBSD's sendfile only operates on sockets.
True. If benchmarking shows this is profitable then we'd want to use
copy_file_range(2) on FreeBSD.
We use copy_file_range in GNU Coreutils. Note that it has quite a few
issues [1], including a recent one affecting files larger than INT_MAX
bytes [2][3].

Coreutils has Gnulib to work around this stuff, and the performance
improvement is meaningful for 'cp'. Based on earlier messages in this
thread, I am not sure if it is worth dealing with in this case.

Collin

[1] https://lwn.net/Articles/789527/
[2] https://sourceware.org/PR33245
[3] https://bugs.gnu.org/79139
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help