This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Seeking consensus on BZ 16734

On 02/02/2015 06:14 AM, Rich Felker wrote:
> 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 <> 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.

Historically, some Linux VFS read implementations could transfer the
data by mapping full pages (/dev/zero was one of them).  I think they
have been gone for a long time because you need to copy lots and lots of
data (certainly more than 8K) before you lose against remapping and the
cache invalidation that comes with it.

Florian Weimer / Red Hat Product Security

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]