malloc - cache locality - TLB

Rich Felker dalias@aerifal.cx
Sat Dec 21 15:33:00 GMT 2013


On Fri, Dec 20, 2013 at 08:00:51PM +0100, Ondřej Bílka wrote:
> On Fri, Dec 20, 2013 at 11:21:16AM -0500, Rich Felker wrote:
> > On Fri, Dec 20, 2013 at 05:09:15PM +0100, Ondřej Bílka wrote:
> > > As linux supported since 2003 huge pages we could try to use these.
> > 
> > Transparentt huge pages are the only sane way to use them, and they're
> > already supported for huge malloc calls serviced by mmap.
> 
> This needs to invoke libhugetlbfs which is extra dependency. A
> transparency is not wanted as we need to distinguish cases where these
> pages will be used versus where not.

No it doesn't. That's the old, nasty, should-be-deprecated
non-transparent way. With transparent huge pages enabled in the
kernel, the kernel simply uses them when you call mmap without
userspace ever having to be aware of it.

Rich



More information about the Libc-alpha mailing list