On Mon, Oct 10, 2011 at 12:29:03PM +0200, Jakub Jelinek wrote: > On Mon, Oct 10, 2011 at 12:15:14PM +0200, Richard Guenther wrote: > > On Sun, Oct 9, 2011 at 9:55 PM, Andi Kleen <a...@firstfloor.org> wrote: > > > From: Andi Kleen <a...@linux.intel.com> > > > > > > Benchmarks show slightly faster build times on a kernel > > > build, near the measurement error unfortunately. > > > > > > This will only work with a recent glibc that defines MADV_HUGEPAGE. > > > > Will partial unmaps fail or split the page? > > I think it will not do anything, because with G.pagesize * GGC_QUIRE_SIZE
On large builds (LTO) I see the vmstat THP counter increasing, it doesn't do too much on small builds. > being just 2MB (and most likely not 2MB aligned either) it would do > something only if it happens to be 2MB aligned or the following VMA > is also MADV_HUGEPAGE hinted and no pages in the 2MB region have been > paged in yet. > So, either we need to ensure that the address is likely 2MB aligned, > or use on x86_64 even bigger GGC_QUIRE_SIZE (such as 16MB or 32MB) and > then huge pages would be likely used at least for the aligned inner > huge pages in the region. Hmm, that gets too complicated for mee. I'll drop the patch for now. It's not strictly needed to fix the fragmentation problem and it's also possible to force THP from the kernel. -Andi -- a...@linux.intel.com -- Speaking for myself only.