diff --git a/[refs] b/[refs] index 046d381fd559..3b79ddad865f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c5a73c3d55be1faadba35b41a862e036a3b12ddb +refs/heads/master: 97562cd243298acf573620c764a1037bd545c9bc diff --git a/trunk/mm/huge_memory.c b/trunk/mm/huge_memory.c index 45b6d53bcfbc..892d8a17a7e5 100644 --- a/trunk/mm/huge_memory.c +++ b/trunk/mm/huge_memory.c @@ -527,6 +527,14 @@ static int __init hugepage_init(void) goto out; } + /* + * By default disable transparent hugepages on smaller systems, + * where the extra memory used could hurt more than TLB overhead + * is likely to save. The admin can still enable it through /sys. + */ + if (totalram_pages < (512 << (20 - PAGE_SHIFT))) + transparent_hugepage_flags = 0; + start_khugepaged(); set_recommended_min_free_kbytes();