This is the mail archive of the libc-alpha@sourceware.org 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 Mon, Feb 02, 2015 at 11:20:01AM +0100, Andreas Schwab wrote:
> Rich Felker <dalias@libc.org> writes:
> 
> > 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
> > faster.
> 
> Page aligned copies from the page cache should be faster.
> 
That is false, processor cache is divided into cache lines which are
generaly 64 byte long, not pages so aligning does not give speedup.

It could be harmful for some processors, if they use hash function that
conflicts when cache lines are multiple of page appart causing
performance loss.


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