[PATCH 2/2] powerpc/mm: don't do tlbie for updatepp request with NO HPTE fault
Benjamin Herrenschmidt
benh at kernel.crashing.org
Tue Dec 2 10:59:37 AEDT 2014
On Mon, 2014-11-03 at 20:21 +0530, Aneesh Kumar K.V wrote:
> --- a/arch/powerpc/mm/hash_native_64.c
> +++ b/arch/powerpc/mm/hash_native_64.c
> @@ -283,11 +283,11 @@ static long native_hpte_remove(unsigned long hpte_group)
>
> static long native_hpte_updatepp(unsigned long slot, unsigned long newpp,
> unsigned long vpn, int bpsize,
> - int apsize, int ssize, int local)
> + int apsize, int ssize, unsigned long flags)
> {
> struct hash_pte *hptep = htab_address + slot;
> unsigned long hpte_v, want_v;
> - int ret = 0;
> + int ret = 0, local = 0;
>
> want_v = hpte_encode_avpn(vpn, bpsize, ssize);
>
> @@ -322,8 +322,15 @@ static long native_hpte_updatepp(unsigned long slot, unsigned long newpp,
> }
> native_unlock_hpte(hptep);
> }
> - /* Ensure it is out of the tlb too. */
> - tlbie(vpn, bpsize, apsize, ssize, local);
> +
> + if (flags & HPTE_LOCAL_UPDATE)
> + local = 1;
> + /*
> + * Ensure it is out of the tlb too if it is not a nohpte fault
> + */
> + if (!(flags & HPTE_NOHPTE_UPDATE))
> + tlbie(vpn, bpsize, apsize, ssize, local);
> +
> return ret;
> }
An additional refinement we discussed that I'd like you to test/measure
is to basically always be local for updatepp unless we have a flag that
forces us not to.
That flag would be set by copro faults only.
Can you do something on top of this series ?
Cheers,
Ben.
More information about the Linuxppc-dev
mailing list