linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Mel Gorman <mgorman@suse.de>
To: Cong Wang <amwang@redhat.com>
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
	Andrea Arcangeli <aarcange@redhat.com>,
	Mel Gorman <mel@csn.ul.ie>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Rik van Riel <riel@redhat.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	linux-mm@kvack.org
Subject: Re: [PATCH 2/3] mm: make the threshold of enabling THP configurable
Date: Tue, 21 Jun 2011 10:36:40 +0100	[thread overview]
Message-ID: <20110621093640.GD9396@suse.de> (raw)
In-Reply-To: <4DFF8050.9070201@redhat.com>

On Tue, Jun 21, 2011 at 01:16:00AM +0800, Cong Wang wrote:
> ??? 2011???06???21??? 00:59, Mel Gorman ??????:
> >On Tue, Jun 21, 2011 at 12:34:29AM +0800, Amerigo Wang wrote:
> >>Don't hard-code 512M as the threshold in kernel, make it configruable,
> >>and set 512M by default.
> >>
> >
> >I'm not seeing the gain here either. This is something that is going to
> >be set by distributions and probably never by users. If the default of
> >512 is incorrect, what should it be? Also, the Kconfig help message has
> >spelling errors.
> >
> 
> Sorry for spelling errors, I am not an English speaker.
> 
> Hard-coding is almost never a good thing in kernel, enforcing 512
> is not good either. Since the default is still 512, I don't think this
> will affect much users.
> 
> I do agree to improve the help message, like Dave mentioned in his reply,
> but I don't like enforcing a hard-coded number in kernel.
> 
> BTW, why do you think 512 is suitable for *all* users?
> 

Fragmentation avoidance benefits from tuning min_free_kbytes to a higher
value and minimising fragmentation-related problems is crucial if THP is
to allocate its necessary pages.

THP tunes min_free_kbytes automatically and this value is in part
related to the number of zones. At 512M on a single node machine, the
recommended min_free_kbytes is close to 10% of memory which is barely
tolerable as it is. At 256M, it's 17%, at 128M, it's 34% so tuning the
value lower has diminishing returns as the performance impact of giving
up such a high percentage of free memory is not going to be offset by
reduced TLB misses. Tuning it to a higher value might make some sense
if the higher min_free_kbytes was a problem but it would be much more
rational to tune it as a sysctl than making it a compile-time decision.

-- 
Mel Gorman
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2011-06-21  9:36 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-20 16:34 [PATCH 1/3] mm: completely disable THP by transparent_hugepage=never Amerigo Wang
2011-06-20 16:34 ` [PATCH 2/3] mm: make the threshold of enabling THP configurable Amerigo Wang
2011-06-20 16:59   ` Dave Hansen
2011-06-20 17:23     ` Cong Wang
2011-06-20 16:59   ` Mel Gorman
2011-06-20 17:16     ` Cong Wang
2011-06-21  9:36       ` Mel Gorman [this message]
2011-06-22  2:41         ` Cong Wang
2011-06-22  9:16           ` Mel Gorman
2011-06-22 10:46             ` Cong Wang
2011-06-22 11:15               ` Mel Gorman
2011-06-22 12:34                 ` Cong Wang
2011-06-20 16:34 ` [PATCH 3/3] mm: print information when THP is disabled automatically Amerigo Wang
2011-06-20 16:54   ` Andrea Arcangeli
2011-06-20 17:25     ` Cong Wang
2011-06-20 17:01   ` Mel Gorman
2011-06-20 17:26     ` Cong Wang
2011-06-20 19:37       ` Andrea Arcangeli
2011-06-21  9:40       ` Mel Gorman
2011-06-20 16:50 ` [PATCH 1/3] mm: completely disable THP by transparent_hugepage=never Andrea Arcangeli
2011-06-20 16:55   ` Rik van Riel
2011-06-20 17:01   ` Cong Wang
2011-06-20 19:43     ` Andrea Arcangeli
2011-06-21  3:15       ` Cong Wang
2011-06-20 16:58 ` Mel Gorman
2011-06-20 17:07   ` Cong Wang
2011-06-20 17:10     ` Rik van Riel
2011-06-20 17:19       ` Cong Wang
2011-06-20 17:28         ` Rik van Riel
2011-06-20 17:34           ` Cong Wang
2011-06-20 17:50             ` Rik van Riel
2011-06-20 18:25               ` Vivek Goyal
2011-06-20 19:21                 ` Andrea Arcangeli
2011-06-21  4:08                   ` Cong Wang
2011-06-21 14:43                     ` Andrea Arcangeli
2011-06-22  2:56                       ` Cong Wang
2011-06-22 14:22                         ` Andrea Arcangeli
2011-06-21 20:01                     ` Rik van Riel
2011-06-21  3:28               ` Cong Wang
2011-06-20 17:58             ` Eric B Munson
2011-06-21  3:36               ` Cong Wang
2011-06-20 17:59           ` Vivek Goyal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110621093640.GD9396@suse.de \
    --to=mgorman@suse.de \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=amwang@redhat.com \
    --cc=benh@kernel.crashing.org \
    --cc=hannes@cmpxchg.org \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mel@csn.ul.ie \
    --cc=riel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox