On Wed, 22 Mar 2023 at 12:20, Jonathan Wakely <jwak...@redhat.com> wrote:

> On Wed, 22 Mar 2023 at 12:18, Jonathan Wakely wrote:
>
>> On Wed, 22 Mar 2023 at 12:14, Jonathan Wakely wrote:
>>
>>>
>>>
>>> On Mon, 20 Mar 2023 at 22:30, Jonathan Wakely via Libstdc++ <
>>> libstd...@gcc.gnu.org> wrote:
>>>
>>>> On 20/03/23 22:27 +0000, Jonathan Wakely wrote:
>>>> >On 06/03/23 20:52 +0100, Jannik Glückert wrote:
>>>> >>we were previously only using sendfile for files smaller than 2GB, as
>>>> >>sendfile needs to be called repeatedly for files bigger than that.
>>>> >>
>>>> >>some quick numbers, copying a 16GB file, average of 10 repetitions:
>>>> >>   old:
>>>> >>       real: 13.4s
>>>> >>       user: 0.14s
>>>> >>       sys : 7.43s
>>>> >>   new:
>>>> >>       real: 8.90s
>>>> >>       user: 0.00s
>>>> >>       sys : 3.68s
>>>> >>
>>>> >>Additionally, this fixes
>>>> >>https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108178
>>>> >>
>>>> >>libstdc++-v3/ChangeLog:
>>>> >>
>>>> >>       * acinclude.m4 (_GLIBCXX_HAVE_LSEEK): define
>>>> >>       * config.h.in: Regenerate.
>>>> >>       * configure: Regenerate.
>>>> >>       * src/filesystem/ops-common.h: enable sendfile for files
>>>> >>         >2GB in std::filesystem::copy_file, skip zero-length files
>>>>
>>>> Also, the ChangeLog entry needs to be indented with tabs, name the
>>>> changed functions, and should be complete sentences, e.g.
>>>>
>>>>         * acinclude.m4 (_GLIBCXX_HAVE_LSEEK): Define.
>>>>         * config.h.in: Regenerate.
>>>>         * configure: Regenerate.
>>>>         * src/filesystem/ops-common.h (copy_file_sendfile): Define new
>>>>         function for sendfile logic. Loop to support large files. Skip
>>>>         zero-length files.
>>>>         (do_copy_file): Use it.
>>>>
>>>>
>>> Here's what I plan to commit in a few weeks when GCC 14 Stage 1 opens.
>>>
>>>
>>>
>> And similarly for the copy_file_range change.
>>
>
> And finally, here's the fix for PR libstdc++/108178, replacing the
> zero-size check with checking for EOF in the source file
>
>
Also now pushed to trunk.

Reply via email to