Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755308Ab1FTRBP (ORCPT ); Mon, 20 Jun 2011 13:01:15 -0400 Received: from cantor.suse.de ([195.135.220.2]:35449 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752128Ab1FTRBK (ORCPT ); Mon, 20 Jun 2011 13:01:10 -0400 Date: Mon, 20 Jun 2011 18:01:07 +0100 From: Mel Gorman To: Amerigo Wang Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org, Andrea Arcangeli , Rik van Riel , Johannes Weiner , KAMEZAWA Hiroyuki , linux-mm@kvack.org Subject: Re: [PATCH 3/3] mm: print information when THP is disabled automatically Message-ID: <20110620170106.GC9396@suse.de> References: <1308587683-2555-1-git-send-email-amwang@redhat.com> <1308587683-2555-3-git-send-email-amwang@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <1308587683-2555-3-git-send-email-amwang@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1361 Lines: 38 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 > --- > 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. -- Mel Gorman SUSE Labs -- 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/