lkml.org 
[lkml]   [2011]   [Jun]   [21]   [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
    On Tue, Jun 21, 2011 at 01:26:58AM +0800, Cong Wang wrote:
    > ??? 2011???06???21??? 01:01, Mel Gorman ??????:
    > >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");
    > >> transparent_hugepage_flags = 0;
    > >>+ }
    > >>
    > >> start_khugepaged();
    > >>
    > >
    > >Guess this doesn't hurt. You misspelled automatically though and
    > >mentioning "hugepage" could be confused with hugetlbfs.
    > >
    >
    > Yeah, sorry for the typo.
    >
    > But, there are many printk messages in the same file start with "hugepage:".
    > :-) I can send a patch to replace all of them with "THP" if you want...
    >

    My bad. They are in a memory allocation failure path that should be
    impossible to trigger but I should still have spotted the prefix at
    the time and complained. Changing them to THP would be nice.

    --
    Mel Gorman
    SUSE Labs


    \
     
     \ /
      Last update: 2011-06-21 11:43    [W:0.021 / U:182.504 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site