public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely@redhat.com>
To: "Jannik Glückert" <jannik.glueckert@gmail.com>
Cc: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH v2 1/2] libstdc++: also use sendfile for big files
Date: Mon, 20 Mar 2023 22:30:24 +0000	[thread overview]
Message-ID: <ZBjegJuddjPghBd2@redhat.com> (raw)
In-Reply-To: <ZBjd1OEyzE7NWogi@redhat.com>

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.



  reply	other threads:[~2023-03-20 22:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-15 19:29 [PATCH v2 1/2] libstdc++: use copy_file_range, improve sendfile in filesystem::copy_file Jannik Glückert
2023-03-20 15:16 ` Jonathan Wakely
2023-03-20 15:18   ` Jonathan Wakely
2023-03-20 22:27 ` [PATCH v2 1/2] libstdc++: also use sendfile for big files Jonathan Wakely
2023-03-20 22:30   ` Jonathan Wakely [this message]
2023-03-22 12:14     ` Jonathan Wakely
2023-03-22 12:18       ` Jonathan Wakely
2023-03-22 12:20         ` Jonathan Wakely
2023-06-06 11:37           ` Jonathan Wakely
2023-06-06 11:36         ` Jonathan Wakely
2023-06-06 11:35       ` Jonathan Wakely

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=ZBjegJuddjPghBd2@redhat.com \
    --to=jwakely@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jannik.glueckert@gmail.com \
    --cc=libstdc++@gcc.gnu.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).