From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ob0-f178.google.com (mail-ob0-f178.google.com [209.85.214.178]) by kanga.kvack.org (Postfix) with ESMTP id 883AF6B0031 for ; Sat, 4 Jan 2014 19:35:10 -0500 (EST) Received: by mail-ob0-f178.google.com with SMTP id uz6so17189103obc.9 for ; Sat, 04 Jan 2014 16:35:10 -0800 (PST) Received: from e31.co.us.ibm.com (e31.co.us.ibm.com. [32.97.110.149]) by mx.google.com with ESMTPS id rj3si51807002oeb.55.2014.01.04.16.35.09 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Sat, 04 Jan 2014 16:35:09 -0800 (PST) Received: from /spool/local by e31.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sat, 4 Jan 2014 17:35:08 -0700 Received: from b03cxnp07028.gho.boulder.ibm.com (b03cxnp07028.gho.boulder.ibm.com [9.17.130.15]) by d03dlp02.boulder.ibm.com (Postfix) with ESMTP id DD3933E4003E for ; Sat, 4 Jan 2014 17:35:05 -0700 (MST) Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by b03cxnp07028.gho.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s050YtH26816108 for ; Sun, 5 Jan 2014 01:34:55 +0100 Received: from d03av02.boulder.ibm.com (localhost [127.0.0.1]) by d03av02.boulder.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s050Z5B8005875 for ; Sat, 4 Jan 2014 17:35:05 -0700 Date: Sun, 5 Jan 2014 08:35:01 +0800 From: Han Pingtian Subject: Re: [RFC] mm: show message when updating min_free_kbytes in thp Message-ID: <20140105003501.GC4106@localhost.localdomain> References: <20140101002935.GA15683@localhost.localdomain> <52C5AA61.8060701@intel.com> <20140103033303.GB4106@localhost.localdomain> <52C6FED2.7070700@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <52C6FED2.7070700@intel.com> Sender: owner-linux-mm@kvack.org List-ID: To: linux-kernel@vger.kernel.org Cc: Dave Hansen , Andrea Arcangeli , Mel Gorman , Andrew Morton , linux-mm@kvack.org, Michal Hocko On Fri, Jan 03, 2014 at 10:17:54AM -0800, Dave Hansen wrote: > On 01/02/2014 07:33 PM, Han Pingtian wrote: > > @@ -130,8 +130,11 @@ static int set_recommended_min_free_kbytes(void) > > (unsigned long) nr_free_buffer_pages() / 20); > > recommended_min <<= (PAGE_SHIFT-10); > > > > - if (recommended_min > min_free_kbytes) > > + if (recommended_min > min_free_kbytes) { > > + pr_info("raising min_free_kbytes from %d to %d to help transparent hugepage allocations\n", > > + min_free_kbytes, recommended_min); > > min_free_kbytes = recommended_min; > > + } > > setup_per_zone_wmarks(); > > return 0; > > } > > I know I gave you that big bloated string, but 108 columns is a _wee_ > bit over 80. :) > > Otherwise, I do like the new message Thanks. This is the new version: From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755078AbaAEAfK (ORCPT ); Sat, 4 Jan 2014 19:35:10 -0500 Received: from e39.co.us.ibm.com ([32.97.110.160]:41798 "EHLO e39.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754579AbaAEAfI (ORCPT ); Sat, 4 Jan 2014 19:35:08 -0500 Date: Sun, 5 Jan 2014 08:35:01 +0800 From: Han Pingtian To: linux-kernel@vger.kernel.org Cc: Dave Hansen , Andrea Arcangeli , Mel Gorman , Andrew Morton , linux-mm@kvack.org, Michal Hocko Subject: Re: [RFC] mm: show message when updating min_free_kbytes in thp Message-ID: <20140105003501.GC4106@localhost.localdomain> Mail-Followup-To: linux-kernel@vger.kernel.org, Dave Hansen , Andrea Arcangeli , Mel Gorman , Andrew Morton , linux-mm@kvack.org, Michal Hocko References: <20140101002935.GA15683@localhost.localdomain> <52C5AA61.8060701@intel.com> <20140103033303.GB4106@localhost.localdomain> <52C6FED2.7070700@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <52C6FED2.7070700@intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14010500-9332-0000-0000-000002AA7C37 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 03, 2014 at 10:17:54AM -0800, Dave Hansen wrote: > On 01/02/2014 07:33 PM, Han Pingtian wrote: > > @@ -130,8 +130,11 @@ static int set_recommended_min_free_kbytes(void) > > (unsigned long) nr_free_buffer_pages() / 20); > > recommended_min <<= (PAGE_SHIFT-10); > > > > - if (recommended_min > min_free_kbytes) > > + if (recommended_min > min_free_kbytes) { > > + pr_info("raising min_free_kbytes from %d to %d to help transparent hugepage allocations\n", > > + min_free_kbytes, recommended_min); > > min_free_kbytes = recommended_min; > > + } > > setup_per_zone_wmarks(); > > return 0; > > } > > I know I gave you that big bloated string, but 108 columns is a _wee_ > bit over 80. :) > > Otherwise, I do like the new message Thanks. This is the new version: >>From f4d085a880dfae7638b33c242554efb0afc0852b Mon Sep 17 00:00:00 2001 From: Han Pingtian Date: Fri, 3 Jan 2014 11:10:49 +0800 Subject: [PATCH] mm: show message when raising min_free_kbytes in THP min_free_kbytes may be raised during THP's initialization. Sometimes, this will change the value being set by user. Showing message will clarify this confusion. Showing the old value of min_free_kbytes according to Dave Hansen's suggestion. This will give user the chance to restore old value of min_free_kbytes. Signed-off-by: Han Pingtian --- mm/huge_memory.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 7de1bf8..7910360 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -130,8 +130,12 @@ static int set_recommended_min_free_kbytes(void) (unsigned long) nr_free_buffer_pages() / 20); recommended_min <<= (PAGE_SHIFT-10); - if (recommended_min > min_free_kbytes) + if (recommended_min > min_free_kbytes) { + pr_info("raising min_free_kbytes from %d to %d " + "to help transparent hugepage allocations\n", + min_free_kbytes, recommended_min); min_free_kbytes = recommended_min; + } setup_per_zone_wmarks(); return 0; } -- 1.7.7.6