From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: Balbir Singh <bsingharora@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>,
linuxppc-dev <linuxppc-dev@ozlabs.org>
Subject: Re: [PATCH v3] powerpc/xmon: Support dumping software pagetables
Date: Mon, 16 Oct 2017 10:57:07 +0530 [thread overview]
Message-ID: <eab17193-a79d-3337-405b-9a773fe7bf0f@linux.vnet.ibm.com> (raw)
In-Reply-To: <CAKTCnzmRfNQNWt-basO+N8A6c=H2XJ=J1H4Z9fftRArgXWkmOw@mail.gmail.com>
On 10/16/2017 10:43 AM, Balbir Singh wrote:
> On Mon, Oct 16, 2017 at 2:34 PM, Aneesh Kumar K.V
> <aneesh.kumar@linux.vnet.ibm.com> wrote:
>> Michael Ellerman <mpe@ellerman.id.au> writes:
>>> +
>>> +#ifdef CONFIG_HUGETLB_PAGE
>>> + if (pud_huge(*pudp)) {
>>> + format_pte(pudp, pud_val(*pudp));
>>> + return;
>>> + }
>>> +#endif
>>
>> For page table walking code we don't need to put #ifdef here.
>
> OK.. I designed this for both, I'll take the #ifdef out for kernel page tables.
>
> Also how
>> should we handle address that we map at pmd level even if hugetlb page
>> is disabled ? (kernel linear mapping). Also where do we handle THP
>> mapping ? You may want to look at __find_linux_pte() to write a page
>> table walking code. or better use the helper.
>
> I wanted to avoid using __find_linux_pte in xmon(), it needs irq's disabled.
> I found the interface a bit cumbersome. If I fix the #ifdef's and make the
> walking code 64 bit only I think we should be OK? Do you agree?
>
__find_linux_pte doesn't require irq disabled. But i would suggest we
add a comment there explaining why it is safe to use without being
worried about irqs/THP split (ex: find_init_mm_pte()). Being in xmon we
are safe there. We moved all the warning about irq disabled etc to
higher level functions.
-aneesh
prev parent reply other threads:[~2017-10-16 5:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-09 10:52 [PATCH v3] powerpc/xmon: Support dumping software pagetables Michael Ellerman
2017-10-12 8:57 ` kbuild test robot
2017-10-12 10:20 ` kbuild test robot
2017-10-16 2:49 ` Balbir Singh
2017-10-16 3:34 ` Aneesh Kumar K.V
2017-10-16 5:13 ` Balbir Singh
2017-10-16 5:27 ` Aneesh Kumar K.V [this message]
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=eab17193-a79d-3337-405b-9a773fe7bf0f@linux.vnet.ibm.com \
--to=aneesh.kumar@linux.vnet.ibm.com \
--cc=bsingharora@gmail.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=mpe@ellerman.id.au \
/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).