From: zhong jiang <zhongjiang@huawei.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: dyoung@redhat.com, horms@verge.net.au, vgoyal@redhat.com,
yinghai@kernel.org, akpm@linux-foundation.org,
linux-mm@kvack.org, kexec@lists.infradead.org
Subject: Re: [PATCH 2/2] kexec: add a pmd huge entry condition during the page table
Date: Wed, 20 Jul 2016 15:25:53 +0800 [thread overview]
Message-ID: <578F2781.80502@huawei.com> (raw)
In-Reply-To: <87vb08ich2.fsf@x220.int.ebiederm.org>
On 2016/7/14 21:19, Eric W. Biederman wrote:
> zhong jiang <zhongjiang@huawei.com> writes:
>
>> On 2016/7/12 23:46, Eric W. Biederman wrote:
>>> zhongjiang <zhongjiang@huawei.com> writes:
>>>
>>>> From: zhong jiang <zhongjiang@huawei.com>
>>>>
>>>> when image is loaded into kernel, we need set up page table for it. and
>>>> all valid pfn also set up new mapping. it will tend to establish a pmd
>>>> page table in the form of a large page if pud_present is true. relocate_kernel
>>>> points to code segment can locate in the pmd huge entry in init_transtion_pgtable.
>>>> therefore, we need to take the situation into account.
>>> I can see how in theory this might be necessary but when is a kernel virtual
>>> address on x86_64 that is above 0x8000000000000000 in conflict with an
>>> identity mapped physicall address that are all below 0x8000000000000000?
>>>
>>> If anything the code could be simplified to always assume those mappings
>>> are unoccupied.
>>>
>>> Did you run into an actual failure somewhere?
>>>
>>> Eric
>>>
>> I do not understand what you trying to say, Maybe I miss your point.
>>
>> The key is how to ensure that relocate_kernel points to the pmd
>> entry is not huge page.
> Kernel virtual addresses are in the negative half of the address space.
> Identity mapped physical addresses are in the positive half of the
> address space.
>
> As the entire negative half of the address space at the time that page
> table entry is being created the are no huge pages present.
>
> Even testing pmd_present is a redundant, and that is probably the bug.
>
> Eric
>
> .
ok , I know your mean. we allocate new pgd page, that is control_code_page,
to rebuild new mapping machanism in init_pgtable. because the relocate_kernel
is in the negative half of the address space. and The page table is not establise
for the new pgd. To my surprise, if the page table is not exist, why we need check
p(g,u,m)d_present() . if not , I still think that it can exist a pmd huge .
or Maybe I misunderstand its meaning.
Thanks
zhongjiang
--
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:[~2016-07-20 7:37 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-12 4:56 [PATCH 1/2] kexec: remove unnecessary unusable_pages zhongjiang
2016-07-12 4:56 ` [PATCH 2/2] kexec: add a pmd huge entry condition during the page table zhongjiang
2016-07-12 15:46 ` Eric W. Biederman
2016-07-13 7:01 ` zhong jiang
2016-07-14 13:19 ` Eric W. Biederman
2016-07-20 7:25 ` zhong jiang [this message]
2016-07-12 15:19 ` [PATCH 1/2] kexec: remove unnecessary unusable_pages Eric W. Biederman
2016-07-13 4:08 ` zhong jiang
2016-07-13 5:07 ` Eric W. Biederman
2016-07-13 7:07 ` zhong jiang
-- strict thread matches above, loose matches on Subject: below --
2016-07-11 6:36 zhongjiang
2016-07-11 6:36 ` [PATCH 2/2] kexec: add a pmd huge entry condition during the page table zhongjiang
2016-07-11 20:25 ` Andrew Morton
2016-07-12 2:21 ` zhong jiang
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=578F2781.80502@huawei.com \
--to=zhongjiang@huawei.com \
--cc=akpm@linux-foundation.org \
--cc=dyoung@redhat.com \
--cc=ebiederm@xmission.com \
--cc=horms@verge.net.au \
--cc=kexec@lists.infradead.org \
--cc=linux-mm@kvack.org \
--cc=vgoyal@redhat.com \
--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 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).