From: Collin Funk <collin.funk1@gmail.com>
To: Ed Maste <emaste@freebsd.org>
Cc: Chris Torek <chris.torek@gmail.com>,
George Hu <integral@archlinux.org>,
git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: Re: [PATCH] copy.c: use `sendfile()` for in-kernel file copying on Linux
Date: Fri, 20 Feb 2026 08:48:55 -0800 [thread overview]
Message-ID: <87o6ljtl6w.fsf@gmail.com> (raw)
In-Reply-To: <CAPyFy2Dj6z9OuYFF9Tpn98mrd3Hs6BD75B73B+jkqp9aVM8X_w@mail.gmail.com>
Ed Maste <emaste@freebsd.org> writes:
> On Sat, 14 Feb 2026 at 11:50, Chris Torek <chris.torek@gmail.com> wrote:
>>
>> 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
next prev parent reply other threads:[~2026-02-20 16:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-13 12:46 [PATCH] copy.c: use `sendfile()` for in-kernel file copying on Linux George Hu
2026-02-13 15:36 ` Chris Torek
2026-02-14 9:21 ` George Hu
2026-02-14 16:50 ` Chris Torek
2026-02-20 16:35 ` Ed Maste
2026-02-20 16:48 ` Collin Funk [this message]
2026-02-14 16:43 ` Phillip Wood
2026-02-15 6:23 ` George Hu
2026-02-15 7:43 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87o6ljtl6w.fsf@gmail.com \
--to=collin.funk1@gmail.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=chris.torek@gmail.com \
--cc=emaste@freebsd.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=integral@archlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox