From: "Aneesh Kumar K.V" <aneesh.kumar@linux•vnet.ibm.com>
To: Michael Neuling <mikey@neuling•org>
Cc: scottwood@freescale•com, linuxppc-dev@lists•ozlabs.org
Subject: Re: [PATCH] powerpc: Fix bad pmd error with book3E config
Date: Wed, 19 Jun 2013 11:52:04 +0530 [thread overview]
Message-ID: <87wqpqhb77.fsf@linux.vnet.ibm.com> (raw)
In-Reply-To: <25129.1371620895@ale.ozlabs.ibm.com>
Michael Neuling <mikey@neuling•org> writes:
> Aneesh Kumar K.V <aneesh.kumar@linux•vnet.ibm.com> wrote:
>
>> From: "Aneesh Kumar K.V" <aneesh.kumar@linux•vnet.ibm.com>
>>
>> Book3E uses the hugepd at PMD level and don't encode pte directly
>> at the pmd level. So it will find the lower bits of pmd set
>> and the pmd_bad check throws error. Infact the current code
>> will never take the free_hugepd_range call at all because it will
>> clear the pmd if it find a hugepd pointer.
>>
>
> Please explain what changes you are making. Currently you are only
> describing what the issue is.
will do
>
> Also include which the SHA1 which caused the regression (ie
> e2b3d202d1dba8f3546ed28224ce485bc50010be "powerpc: Switch 16GB and 16MB
> explicit hugepages to a different page table format")
will add
>
> Mikey
>
>> Reported-by: Scott Wood <scottwood@freescale•com>
>> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux•vnet.ibm.com>
>> ---
>> arch/powerpc/mm/hugetlbpage.c | 29 ++++++++++++++++++-----------
>> 1 file changed, 18 insertions(+), 11 deletions(-)
>>
>> diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c
>> index f2f01fd..0d3d3ee 100644
>> --- a/arch/powerpc/mm/hugetlbpage.c
>> +++ b/arch/powerpc/mm/hugetlbpage.c
>> @@ -536,19 +536,26 @@ static void hugetlb_free_pmd_range(struct mmu_gather *tlb, pud_t *pud,
>> do {
>> pmd = pmd_offset(pud, addr);
>> next = pmd_addr_end(addr, end);
>> - if (pmd_none_or_clear_bad(pmd))
>> - continue;
>> + if (!is_hugepd(pmd)) {
>> + /*
>> + * if it is not hugepd pointer, we should already find
>> + * it cleared.
>> + */
>> + if (!pmd_none_or_clear_bad(pmd))
>> + WARN_ON(1);
>
> How often are we going to hit this? Should this be a warn_on once or
> even a bug_on?
it should never happen. But i was thinking killing the system may a bit
too much, hence WARN_ON
>
> Also just make it:
> WARN_ON(!pmd_none_or_clear_bad(pmd))
>
will do
-aneesh
next prev parent reply other threads:[~2013-06-19 6:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-12 10:30 [PATCH] powerpc: Fix bad pmd error with book3E config Aneesh Kumar K.V
2013-06-12 20:33 ` Scott Wood
2013-06-18 13:02 ` Aneesh Kumar K.V
2013-06-19 5:48 ` Michael Neuling
2013-06-19 6:22 ` Aneesh Kumar K.V [this message]
2013-06-19 6:27 ` Michael Neuling
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=87wqpqhb77.fsf@linux.vnet.ibm.com \
--to=aneesh.kumar@linux$(echo .)vnet.ibm.com \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=mikey@neuling$(echo .)org \
--cc=scottwood@freescale$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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