From: Xianghua Xiao <xiaoxianghua@gmail.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH] Fix DEBUG_PAGEALLOC on 603/e300
Date: Wed, 28 Apr 2010 14:15:50 -0500 [thread overview]
Message-ID: <y2te6bf505b1004281215n9dcc6190j9915aa27ae91f75d@mail.gmail.com> (raw)
In-Reply-To: <1272439375.24542.94.camel@pasglop>
On Wed, Apr 28, 2010 at 2:22 AM, Benjamin Herrenschmidt
<benh@kernel.crashing.org> wrote:
> So we tried to speed things up a bit using flush_hash_pages() directly
> but that falls over on 603 of course meaning we fail to flush the TLB
> properly and we may even end up having it corrupt memory randomly by
> accessing a hash table that doesn't exist.
>
> This removes the "optimization" by always going through flush_tlb_page()
> for now at least.
>
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
>
> Somebody with a 603 or e300 core based FSL SoC to try this out for me ?
>
> It's obviously completely untested :-)
>
> Cheers,
> Ben.
>
> diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c
> index b9243e7..95774b4 100644
> --- a/arch/powerpc/mm/pgtable_32.c
> +++ b/arch/powerpc/mm/pgtable_32.c
> @@ -385,11 +385,7 @@ static int __change_page_attr(struct page *page, pgp=
rot_t prot)
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return -EINVAL;
> =C2=A0 =C2=A0 =C2=A0 =C2=A0__set_pte_at(&init_mm, address, kpte, mk_pte(p=
age, prot), 0);
> =C2=A0 =C2=A0 =C2=A0 =C2=A0wmb();
> -#ifdef CONFIG_PPC_STD_MMU
> - =C2=A0 =C2=A0 =C2=A0 flush_hash_pages(0, address, pmd_val(*kpmd), 1);
> -#else
> =C2=A0 =C2=A0 =C2=A0 =C2=A0flush_tlb_page(NULL, address);
> -#endif
> =C2=A0 =C2=A0 =C2=A0 =C2=A0pte_unmap(kpte);
>
> =C2=A0 =C2=A0 =C2=A0 =C2=A0return 0;
>
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
>
This change works me on a 834x(e300) platform, tested with lmbench and
a production-ready application with 2.6.33.3.
Xianghua
next prev parent reply other threads:[~2010-04-28 19:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-28 7:22 [PATCH] Fix DEBUG_PAGEALLOC on 603/e300 Benjamin Herrenschmidt
2010-04-28 19:15 ` Xianghua Xiao [this message]
2010-04-28 19:46 ` Kim Phillips
2010-04-28 22:29 ` Benjamin Herrenschmidt
2010-05-02 10:27 ` Maindoor
2010-05-03 14:19 ` Xianghua Xiao
2010-05-04 5:13 ` Benjamin Herrenschmidt
2010-05-06 8:23 ` Maindoor
2010-05-06 13:04 ` Maindoor
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=y2te6bf505b1004281215n9dcc6190j9915aa27ae91f75d@mail.gmail.com \
--to=xiaoxianghua@gmail.com \
--cc=benh@kernel.crashing.org \
--cc=linuxppc-dev@lists.ozlabs.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).