lkml.org 
[lkml]   [2011]   [Jun]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/3] mm: print information when THP is disabled automatically
于 2011年06月21日 00:54, Andrea Arcangeli 写道:
> On Tue, Jun 21, 2011 at 12:34:30AM +0800, Amerigo Wang wrote:
>> Print information when THP is disabled automatically so that
>> users can find this info in dmesg.
>>
>> Signed-off-by: WANG Cong<amwang@redhat.com>
>> ---
>> 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");
>
> typo automatically. I'd suggest to change the prefix from "hugepage:"
> to "THP:" to avoid the risk of possible confusion with hugetlbfs
> support. Maybe you could print the minimal threshold too ("disabled
> automatically with less than %dMB of RAM").

Well, the "hugepage:" prefix is copied from other printk messages
in the same function. ;-)

Yeah, it would be nice to print the threshold too.

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

\
 
 \ /
  Last update: 2011-06-20 19:27    [W:0.124 / U:0.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site