From: Zhouping Liu <zliu@redhat.com>
To: Lin Feng <linfeng@cn.fujitsu.com>
Cc: David Rientjes <rientjes@google.com>,
Andrea Arcangeli <aarcange@redhat.com>,
Hugh Dickins <hughd@google.com>, Mel Gorman <mgorman@suse.de>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Amos Kong <akong@redhat.com>
Subject: Re: THP: AnonHugePages in /proc/[pid]/smaps is correct or not?
Date: Tue, 02 Apr 2013 11:48:22 +0800 [thread overview]
Message-ID: <515A5506.1000809@redhat.com> (raw)
In-Reply-To: <515A5329.6020805@cn.fujitsu.com>
On 04/02/2013 11:40 AM, Lin Feng wrote:
> Hi Zhouping,
>
> On 04/02/2013 11:09 AM, Zhouping Liu wrote:
>> I don't understand clearly the last sentence 'you'll probably only get 100% hugepages only 1/512th of the time.'
>> could you please explain more details about 'only 1/512th of the time'?
> IIUC, thp size is 2M so it may be comprised of 512 normal page(size 4k).
> Since your test code is not 2M aligned(not using posix_memalign()) so
> the start address of the mapped vma will be random, such as
> 2M*i+4k*1, 2M*i+4k*2...2M*i+k4*511, there is 512 possibilities.
>
> The only chance you get thp happens when the first map just starts at 2M*i,
> and the consequent maps also benefit from this.
Feng, it's easy to understand now, thanks for your detailed explanation :)
Zhouping
--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2013-04-02 3:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1207916095.642011.1364800448075.JavaMail.root@redhat.com>
2013-04-01 8:00 ` THP: AnonHugePages in /proc/[pid]/smaps is correct or not? Zhouping Liu
2013-04-01 22:23 ` David Rientjes
2013-04-02 3:09 ` Zhouping Liu
2013-04-02 3:40 ` Lin Feng
2013-04-02 3:44 ` David Rientjes
2013-04-02 3:48 ` Zhouping Liu [this message]
2013-04-02 12:23 ` Simon Jeons
2013-04-02 18:09 ` David Rientjes
2013-04-02 23:58 ` Simon Jeons
2013-04-02 12:26 ` Simon Jeons
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=515A5506.1000809@redhat.com \
--to=zliu@redhat.com \
--cc=aarcange@redhat.com \
--cc=akong@redhat.com \
--cc=hughd@google.com \
--cc=linfeng@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=rientjes@google.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;
as well as URLs for NNTP newsgroup(s).