From: Joachim Schmitz <jojo@schmitz-digital•de>
To: git@vger•kernel.org
Subject: Re: read() MAX_IO_SIZE bytes, more than SSIZE_MAX?
Date: Sat, 7 Feb 2015 18:36:35 +0000 (UTC) [thread overview]
Message-ID: <loom.20150207T193242-470@post.gmane.org> (raw)
In-Reply-To: 01f501d04302$bb9a46b0$32ced410$@nexbridge.com
Randall S. Becker <rsbecker <at> nexbridge.com> writes:
>
> On 2015-02-07 13:07PM Randall S. Becker wrote:
> >On 2015-02-07 12:30PM Torsten Bögershausen wrote:
> >>On 2015-02-07 17.45, Joachim Schmitz wrote:
<spip>
> Although I do agree with Jojo, that MAX_IO_SIZE seems to be a platform
> constant and should be defined in terms of SSIZE_MAX. So something like:
>
> #ifndef MAX_IO_SIZE
> # ifdef SSIZE_MAX
> # define MAX_IO_SIZE (SSIZE_MAX)
> # else
> # define MAX_IO_SIZE (8*1024*1024)
> # endif
> #endif
>
> would be desirable.
It would be way too large on some platforms. those 8MB had been chosen for
a good reason, I assume:
/*
* Limit size of IO chunks, because huge chunks only cause pain. OS X
* 64-bit is buggy, returning EINVAL if len >= INT_MAX; and even in
* the absence of bugs, large chunks can result in bad latencies when
* you decide to kill the process.
*/
However it should never be larger than SSIZE_MAX
next prev parent reply other threads:[~2015-02-07 18:36 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-07 16:45 read() MAX_IO_SIZE bytes, more than SSIZE_MAX? Joachim Schmitz
2015-02-07 16:48 ` Joachim Schmitz
2015-02-07 17:19 ` Torsten Bögershausen
2015-02-07 17:29 ` Joachim Schmitz
2015-02-07 18:03 ` Joachim Schmitz
2015-02-07 20:32 ` Torsten Bögershausen
2015-02-07 22:13 ` Junio C Hamano
2015-02-07 22:31 ` Joachim Schmitz
2015-02-08 2:13 ` Junio C Hamano
2015-02-08 2:32 ` Randall S. Becker
2015-02-08 12:05 ` Joachim Schmitz
2015-02-08 17:09 ` Eric Sunshine
2015-02-11 21:13 ` Junio C Hamano
2015-02-11 21:29 ` Joachim Schmitz
2015-02-11 22:05 ` Joachim Schmitz
2015-02-11 23:15 ` Junio C Hamano
2015-02-07 18:06 ` Randall S. Becker
2015-02-07 18:20 ` Randall S. Becker
2015-02-07 18:36 ` Joachim Schmitz [this message]
2015-02-07 19:14 ` Joachim Schmitz
-- strict thread matches above, loose matches on Subject: below --
2015-02-12 7:46 Joachim Schmitz
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=loom.20150207T193242-470@post.gmane.org \
--to=jojo@schmitz-digital$(echo .)de \
--cc=git@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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