[PATCH v3] powerpc/xmon: Support dumping software pagetables

Aneesh Kumar K.V aneesh.kumar at linux.vnet.ibm.com
Mon Oct 16 16:27:07 AEDT 2017



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 at linux.vnet.ibm.com> wrote:
>> Michael Ellerman <mpe at 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



More information about the Linuxppc-dev mailing list