From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: Hari Bathini <hbathini@linux.vnet.ibm.com>,
Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev <linuxppc-dev@ozlabs.org>,
Mahesh J Salgaonkar <mahesh@linux.vnet.ibm.com>
Subject: Re: [PATCH v2] powerpc/mm: export current mmu mode info
Date: Fri, 23 Sep 2016 10:14:27 +0530 [thread overview]
Message-ID: <878tujz0lw.fsf@linux.vnet.ibm.com> (raw)
In-Reply-To: <92b66a3f-809b-bd63-22cd-56e7707de479@linux.vnet.ibm.com>
Hari Bathini <hbathini@linux.vnet.ibm.com> writes:
> Hi Aneesh,
>
>
> On Thursday 22 September 2016 09:54 PM, Aneesh Kumar K.V wrote:
>> Hari Bathini <hbathini@linux.vnet.ibm.com> writes:
>>
>>> The kernel now supports both radix and hash MMU modes. Tools like crash
>>> and makedumpfile need to know the current MMU mode the kernel is using,
>>> to debug/analyze it. The current MMU mode depends on hardware support
>>> and also whether disable_radix cmdline parameter is passed to the kernel.
>>> The mmu_features member of cpu_spec structure holds the current MMU mode
>>> a cpu is using. But the above mentioned tools need to know the MMU mode
>>> early in their init process, when they may not have access to offset info
>>> of structure members. A hard-coded offset may help but it won't be robust.
>> IIUC, you walk the linux page table and that should be more or less same
>
> Taking the case of crash tool, vmemmap start value is currently
> hard-coded to 0xf000000000000000UL but it changed to
> 0xc00a000000000000UL in case of radix.
All of that is already defined as variables in the kernel. You can look at
radix__early_init_mmu().
>
>> between radix/hash right except few bits. Now what crash will be
>> interested in will be the RPN part of the table which should be same
>> between hash/radix.
>
> Though the walk is pretty much the same, the tool still needs to know
> the right index values and vmemmap start to use, as they are different
> for radix and hash..
>
>>> This patch introduces a new global variable, which holds the current MMU
>>> mode the kernel is running in and can be accessed by tools early in thier
>>> init process,
>> Init process of what ? kernel or crash tool ?
>
> tool initialization - crash or makedumpfile..
>
>>> helping tools to initialize accurately for each MMU mode.
>>> This patch also optimizes the radix_enabled() function call.
>>>
>> how do you differentiate between the hold linux page table format and
>> the new ? Can you also summarize what crash tool look for in the page
>> table ?
>
> It needs the index sizes, masked bit values and page flag info to
> do the page table walk. Since they can be different for hash and
> radix..
>
Can you look at radix__early_init_mmu/hash__early_init_mmu and see you
can work with the variables defined there ?
-aneesh
next prev parent reply other threads:[~2016-09-23 4:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-22 16:02 [PATCH v2] powerpc/mm: export current mmu mode info Hari Bathini
2016-09-22 16:21 ` Hari Bathini
2016-09-22 16:24 ` Aneesh Kumar K.V
2016-09-22 16:53 ` Hari Bathini
2016-09-23 4:44 ` Aneesh Kumar K.V [this message]
2016-09-23 6:18 ` Hari Bathini
2016-09-23 11:10 ` Michael Ellerman
2016-09-26 18:44 ` Hari Bathini
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=878tujz0lw.fsf@linux.vnet.ibm.com \
--to=aneesh.kumar@linux.vnet.ibm.com \
--cc=hbathini@linux.vnet.ibm.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=mahesh@linux.vnet.ibm.com \
--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).