On Wed, 7 Nov 2012, Kirill A. Shutemov wrote:

> From: "Kirill A. Shutemov" <kirill.shute...@linux.intel.com>
> 
> Instead of allocating huge zero page on hugepage_init() we can postpone it
> until first huge zero page map. It saves memory if THP is not in use.
> 

Is it worth the branch on every non-write pagefault after that?  The 
unlikely() is not going to help on x86.  If thp is enabled in your 
.config (which isn't the default), then I think it's better to just 
allocate the zero huge page once and avoid any branches after that to 
lazily allocate it.  (Or do it only when thp is set to "madvise" or 
"always" if booting with transparent_hugepage=never.)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to