[2.4] [PATCH] hash_page rework, take 2

Benjamin Herrenschmidt benh at kernel.crashing.org
Fri Feb 13 08:20:02 EST 2004


On Fri, 2004-02-13 at 08:00, Olof Johansson wrote:
> After feedback from Julie and Ben, here's a revised mainline patch.
> Consider this last call for comments before I push. :-)
>
>
> Changes:
>
> * Add a smb_mb() in pte_free_sync(), to make sure that any 0-writes to
> PTE/PMDs are seen on other processors before the free.

Actually, what matters is before the is_locked(), we act both
as a write barrier for the 0 and a read barrier for is_locked().

That said... I wonder if the implementation of is_locked() shouldn't
have a rmb() by default after all ...

> * Make sure "newpp" is never more than 3 bits. This saves us from
> crashing older iSeries hypervisor. Shouldn't be a problem since we don't
> do aging in 2.4, but I prefer the more conservative approach.

Not only crashing older HVs, but crashing the kernel with newer HVs ;)

> * Add an isync after the _PAGE_BUSY lock, to avoid out-of-order execution.
>
> * Don't invalidate/update/validate a HPTE in hpte_updatepp unless the pp
> bits have changed. This avoids a pileup of faults caused by other
> processors faulting during the period when the HPTE is invalid and/or
> several processors faulting at the same time and resolving the same fault.
>
> * Other logic fixes based on discussions on this list, mostly dealing
> with timing windows during which _PAGE_BUSY was cleared inappropriately.

Did you spot any case that could have affected the 2.6 version ?

Ben.


** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc64-dev mailing list