[PATCH 3/3] mm: print information when THP is disabled automatically

From: Amerigo Wang
Date: Mon Jun 20 2011 - 12:35:39 EST


Print information when THP is disabled automatically so that
users can find this info in dmesg.

Signed-off-by: WANG Cong <amwang@xxxxxxxxxx>
---
mm/huge_memory.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 7fb44cc..07679da 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -544,8 +544,11 @@ static int __init hugepage_init(void)
* 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 < (CONFIG_TRANSPARENT_HUGEPAGE_THRESHOLD << (20 - PAGE_SHIFT)))
+ if (totalram_pages < (CONFIG_TRANSPARENT_HUGEPAGE_THRESHOLD
+ << (20 - PAGE_SHIFT))) {
+ printk(KERN_INFO "hugepage: disabled auotmatically\n");
transparent_hugepage_flags = 0;
+ }

start_khugepaged();

--
1.7.4.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/