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 11:21:16 -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>
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. The kernel
could also opt to use huge pages for heap ranges consisting of many
independent allocations, but this would probably be a pessimization in
the general case because it precludes fine-grained swapping of unused
data and like you mentioned has ridiculous overhead.
Rich