This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: malloc - cache locality - TLB
- From: Rich Felker <dalias at aerifal dot cx>
- To: OndÅej BÃlka <neleai at seznam dot cz>
- Cc: Torvald Riegel <triegel at redhat dot com>, Carlos O'Donell <carlos at redhat dot com>, GNU C Library <libc-alpha at sourceware dot org>, Roland McGrath <roland at hack dot frob dot com>, Andreas Jaeger <aj at suse dot com>, "Joseph S. Myers" <joseph at codesourcery dot com>, Andreas Schwab <schwab at suse dot de>, Siddhesh Poyarekar <siddhesh at redhat dot com>
- Date: Fri, 20 Dec 2013 17:43:38 -0500
- Subject: Re: malloc - cache locality - TLB
- Authentication-results: sourceware.org; auth=none
- References: <52A6A0DA dot 1080109 at redhat dot com> <1386688619 dot 23049 dot 3215 dot camel at triegel dot csb> <20131220022411 dot GA26981 at domone dot podge> <20131220160915 dot GA7826 at domone dot podge> <20131220162116 dot GP24286 at brightrain dot aerifal dot cx> <20131220190051 dot GA9523 at domone dot podge>
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