From: "H. Peter Anvin" <hpa@zytor.com>
To: Yinghai Lu <yinghai@kernel.org>
Cc: Lin Feng <linfeng@cn.fujitsu.com>,
akpm@linux-foundation.org, linux-mm@kvack.org, x86@kernel.org,
linux-kernel@vger.kernel.org, tglx@linutronix.de,
mingo@redhat.com, penberg@kernel.org, jacob.shin@amd.com
Subject: Re: [PATCH] x86: mm: accurate the comments for STEP_SIZE_SHIFT macro
Date: Mon, 18 Mar 2013 15:50:30 -0700 [thread overview]
Message-ID: <51479A36.3050600@zytor.com> (raw)
In-Reply-To: <CAE9FiQU2iqx=9LEx_u6J5O_kQ-5Lo6DTgSgnk71k0p6WWUa7Hg@mail.gmail.com>
On 03/18/2013 02:19 PM, Yinghai Lu wrote:
> On Mon, Mar 18, 2013 at 12:14 PM, H. Peter Anvin <hpa@zytor.com> wrote:
>
>> Instead, try to explain why 5 is the correct value in the current code
>> and how it is (or should be!) derived.
>
> initial mapped size is PMD_SIZE, aka 2M.
> if we use step_size to be PUD_SIZE aka 1G, as most worse case
> that 1G is cross the 1G boundary, and PG_LEVEL_2M is not set,
> we will need 1+1+512 pages (aka 2M + 8k) to map 1G range with PTE.
> So i picked (30-21)/2 to get 5.
>
> Please check attached patch.
>
> Thanks
>
> Yinghai
>
This still seems very opaque. I need to look at it and see if it makes
more sense in context.
-hpa
--
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>
WARNING: multiple messages have this Message-ID (diff)
From: "H. Peter Anvin" <hpa@zytor.com>
To: Yinghai Lu <yinghai@kernel.org>
Cc: Lin Feng <linfeng@cn.fujitsu.com>,
akpm@linux-foundation.org, linux-mm@kvack.org, x86@kernel.org,
linux-kernel@vger.kernel.org, tglx@linutronix.de,
mingo@redhat.com, penberg@kernel.org, jacob.shin@amd.com
Subject: Re: [PATCH] x86: mm: accurate the comments for STEP_SIZE_SHIFT macro
Date: Mon, 18 Mar 2013 15:50:30 -0700 [thread overview]
Message-ID: <51479A36.3050600@zytor.com> (raw)
In-Reply-To: <CAE9FiQU2iqx=9LEx_u6J5O_kQ-5Lo6DTgSgnk71k0p6WWUa7Hg@mail.gmail.com>
On 03/18/2013 02:19 PM, Yinghai Lu wrote:
> On Mon, Mar 18, 2013 at 12:14 PM, H. Peter Anvin <hpa@zytor.com> wrote:
>
>> Instead, try to explain why 5 is the correct value in the current code
>> and how it is (or should be!) derived.
>
> initial mapped size is PMD_SIZE, aka 2M.
> if we use step_size to be PUD_SIZE aka 1G, as most worse case
> that 1G is cross the 1G boundary, and PG_LEVEL_2M is not set,
> we will need 1+1+512 pages (aka 2M + 8k) to map 1G range with PTE.
> So i picked (30-21)/2 to get 5.
>
> Please check attached patch.
>
> Thanks
>
> Yinghai
>
This still seems very opaque. I need to look at it and see if it makes
more sense in context.
-hpa
next prev parent reply other threads:[~2013-03-18 22:50 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-18 10:21 [PATCH] x86: mm: accurate the comments for STEP_SIZE_SHIFT macro Lin Feng
2013-03-18 10:21 ` Lin Feng
2013-03-18 18:53 ` Yinghai Lu
2013-03-18 18:53 ` Yinghai Lu
2013-03-18 18:59 ` H. Peter Anvin
2013-03-18 18:59 ` H. Peter Anvin
2013-03-18 19:13 ` Yinghai Lu
2013-03-18 19:13 ` Yinghai Lu
2013-03-18 19:14 ` H. Peter Anvin
2013-03-18 19:14 ` H. Peter Anvin
2013-03-18 21:19 ` Yinghai Lu
2013-03-18 22:50 ` H. Peter Anvin [this message]
2013-03-18 22:50 ` H. Peter Anvin
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=51479A36.3050600@zytor.com \
--to=hpa@zytor.com \
--cc=akpm@linux-foundation.org \
--cc=jacob.shin@amd.com \
--cc=linfeng@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mingo@redhat.com \
--cc=penberg@kernel.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=yinghai@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.