This is the mail archive of the
mailing list for the glibc project.
Re: Seeking consensus on BZ 16734
- From: Rich Felker <dalias at libc dot org>
- To: Paul Pluzhnikov <ppluzhnikov at google dot com>
- Cc: "H.J. Lu" <hjl dot tools at gmail dot com>, GLIBC Devel <libc-alpha at sourceware dot org>, Daniel Colascione <dancol at dancol dot org>, Andrew Pinski <pinskia at gmail dot com>
- Date: Mon, 2 Feb 2015 00:14:10 -0500
- Subject: Re: Seeking consensus on BZ 16734
- Authentication-results: sourceware.org; auth=none
- References: <CALoOobP_7jpdZUqSFmKCTFds6t8TTdnxfOfg2jCTr_TjvU+t2w at mail dot gmail dot com> <CAMe9rOrp6jCuPe4ZX-kdHdO_4_k-Dpf7ha-PxtCJmJLnL3K0-A at mail dot gmail dot com> <CALoOobMZFx7c+i0GCFRg1-1Z=2H3xDDH8+td-D=0k9muAFvPAA at mail dot gmail dot com>
On Sun, Feb 01, 2015 at 08:46:06PM -0800, Paul Pluzhnikov wrote:
> On Sun, Feb 1, 2015 at 8:09 PM, H.J. Lu <email@example.com> wrote:
> >> Can we just do it?
> > Do we have any current performance data on this?
> I am not sure what performance data you want.
> The application CPU will go up (calloc has to zero out space), kernel
> CPU will go down (kernel would not have to zero out the same space).
> It's clear that calloc()ing 8K is much cheaper than mmap()ing,
> especially when there are 100s of threads.
The original idea seems to be some misguided idea that read/write
should perform better with a page-aligned buffer. I can't make any
sense of this believe except in the case of the O_DIRECT silliness
Linux supports; normally IO is going to be memcpy to/from fs cache
buffers and there's no reason to expect page alignment to make that