From: Eric B Munson <emunson@mgebm.net>
To: Cong Wang <amwang@redhat.com>
Cc: Rik van Riel <riel@redhat.com>, Mel Gorman <mgorman@suse.de>,
linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
Andrea Arcangeli <aarcange@redhat.com>,
Johannes Weiner <jweiner@redhat.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
linux-mm@kvack.org
Subject: Re: [PATCH 1/3] mm: completely disable THP by transparent_hugepage=never
Date: Mon, 20 Jun 2011 13:58:59 -0400 [thread overview]
Message-ID: <20110620175859.GB9697@mgebm.net> (raw)
In-Reply-To: <4DFF84BB.3050209@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2689 bytes --]
On Tue, 21 Jun 2011, Cong Wang wrote:
> 于 2011年06月21日 01:28, Rik van Riel 写道:
> >On 06/20/2011 01:19 PM, Cong Wang wrote:
> >>于 2011年06月21日 01:10, Rik van Riel 写道:
> >>>On 06/20/2011 01:07 PM, Cong Wang wrote:
> >>>>于 2011年06月21日 00:58, Mel Gorman 写道:
> >>>>>On Tue, Jun 21, 2011 at 12:34:28AM +0800, Amerigo Wang wrote:
> >>>>>>transparent_hugepage=never should mean to disable THP completely,
> >>>>>>otherwise we don't have a way to disable THP completely.
> >>>>>>The design is broken.
> >>>>>>
> >>>>>
> >>>>>I don't get why it's broken. Why would the user be prevented from
> >>>>>enabling it at runtime?
> >>>>>
> >>>>
> >>>>We need to a way to totally disable it, right? Otherwise, when I
> >>>>configure
> >>>>THP in .config, I always have THP initialized even when I pass "=never".
> >>>>
> >>>>For me, if you don't provide such way to disable it, it is not flexible.
> >>>>
> >>>>I meet this problem when I try to disable THP in kdump kernel, there is
> >>>>no user of THP in kdump kernel, THP is a waste for kdump kernel. This is
> >>>>why I need to find a way to totally disable it.
> >>>
> >>>What you have not explained yet is why having THP
> >>>halfway initialized (but not used, and without a
> >>>khugepaged thread) is a problem at all.
> >>>
> >>>Why is it a problem for you?
> >>
> >>It occupies some memory, memory is valuable in kdump kernel (usually
> >>only 128M). :) Since I am sure no one will use it, why do I still need
> >>to initialize it at all?
> >
> >Lets take a look at how much memory your patches end
> >up saving.
> >
> >By bailing out earlier in hugepage_init, you end up
> >saving 3 sysfs objects, one slab cache and a hash
> >table with 1024 pointers. That's a total of maybe
> >10kB of memory on a 64 bit system.
> >
> >I'm not convinced that a 10kB memory reduction is
> >worth the price of never being able to enable
> >transparent hugepages when a system is booted with
> >THP disabled...
> >
>
> Even if it is really 10K, why not save it since it doesn't
> much effort to make this. ;) Not only memory, but also time,
> this could also save a little time to initialize the kernel.
>
> For me, the more serious thing is the logic, there is
> no way to totally disable it as long as I have THP in .config
> currently. This is why I said the design is broken.
>
> Thanks.
>
If memory is this scarce, why not set CONFIG_TRANSPARENT_HUGEPAGE=n and be done
with it? If the config option is enabled, the admin should be able to turn the
functionality back on if desired. If you really don't _ever_ want THP then
disable the config.
Eric
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
next prev parent reply other threads:[~2011-06-20 17:59 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-20 16:34 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
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 [this message]
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=20110620175859.GB9697@mgebm.net \
--to=emunson@mgebm.net \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=amwang@redhat.com \
--cc=jweiner@redhat.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--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