From: Michael Ellerman <michael@ellerman.id.au>
To: Li Zhong <zhong@linux.vnet.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org, paulus@samba.org
Subject: Re: [RFC PATCH v2 1/4] powerpc: Move the setting of rflags out of loop in __hash_page_huge
Date: Mon, 15 Apr 2013 16:32:58 +1000 [thread overview]
Message-ID: <20130415063258.GE21147@concordia> (raw)
In-Reply-To: <1365733021-28912-2-git-send-email-zhong@linux.vnet.ibm.com>
On Fri, Apr 12, 2013 at 10:16:57AM +0800, Li Zhong wrote:
> It seems that rflags don't get changed in the repeating loop, so move
> it out of the loop.
You've also changed the way new_pte is handled on repeat, but I think
that's OK too.
cheers
> diff --git a/arch/powerpc/mm/hugetlbpage-hash64.c b/arch/powerpc/mm/hugetlbpage-hash64.c
> index cecad34..edb4129 100644
> --- a/arch/powerpc/mm/hugetlbpage-hash64.c
> +++ b/arch/powerpc/mm/hugetlbpage-hash64.c
> @@ -87,10 +87,6 @@ int __hash_page_huge(unsigned long ea, unsigned long access, unsigned long vsid,
>
> pa = pte_pfn(__pte(old_pte)) << PAGE_SHIFT;
>
> -repeat:
> - hpte_group = ((hash & htab_hash_mask) *
> - HPTES_PER_GROUP) & ~0x7UL;
> -
> /* clear HPTE slot informations in new PTE */
> #ifdef CONFIG_PPC_64K_PAGES
> new_pte = (new_pte & ~_PAGE_HPTEFLAGS) | _PAGE_HPTE_SUB0;
ie. here new_pte was updated on repeat, but now it's not.
> @@ -101,6 +97,10 @@ repeat:
> rflags |= (new_pte & (_PAGE_WRITETHRU | _PAGE_NO_CACHE |
> _PAGE_COHERENT | _PAGE_GUARDED));
>
> +repeat:
> + hpte_group = ((hash & htab_hash_mask) *
> + HPTES_PER_GROUP) & ~0x7UL;
> +
> /* Insert into the hash table, primary slot */
> slot = ppc_md.hpte_insert(hpte_group, vpn, pa, rflags, 0,
> mmu_psize, ssize);
next prev parent reply other threads:[~2013-04-15 6:32 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-12 2:16 [RFC PATCH v2 0/4] try secondary hash before BUG in kernel_map_linear_page() Li Zhong
2013-04-12 2:16 ` [RFC PATCH v2 1/4] powerpc: Move the setting of rflags out of loop in __hash_page_huge Li Zhong
2013-04-15 6:32 ` Michael Ellerman [this message]
2013-04-15 8:17 ` Li Zhong
2013-04-12 2:16 ` [RFC PATCH v2 2/4] powerpc: Split the code trying to insert hpte repeatedly as an helper function Li Zhong
2013-04-12 2:16 ` [RFC PATCH v2 3/4] powerpc: Don't bolt the hpte in kernel_map_linear_page() Li Zhong
2013-04-15 3:50 ` Paul Mackerras
2013-04-15 6:56 ` Benjamin Herrenschmidt
2013-04-15 8:15 ` Li Zhong
2013-04-15 11:27 ` Benjamin Herrenschmidt
2013-04-16 2:51 ` Li Zhong
2013-04-12 2:17 ` [RFC PATCH v2 4/4] powerpc: Try to insert the hptes repeatedly " Li Zhong
2013-04-15 6:36 ` Michael Ellerman
2013-04-15 8:21 ` Li Zhong
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=20130415063258.GE21147@concordia \
--to=michael@ellerman.id.au \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=paulus@samba.org \
--cc=zhong@linux.vnet.ibm.com \
/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).