[PATCH 1/2] powerpc: use smp_rmb when looking at deposisted pgtable to store hash index
Aneesh Kumar K.V
aneesh.kumar at linux.vnet.ibm.com
Mon May 20 19:26:18 EST 2013
Benjamin Herrenschmidt <benh at kernel.crashing.org> writes:
> On Mon, 2013-05-20 at 09:57 +0530, Aneesh Kumar K.V wrote:
>> Michael Neuling <mikey at neuling.org> writes:
>>
>> > Aneesh Kumar K.V <aneesh.kumar at linux.vnet.ibm.com> wrote:
>> >
>> >> From: "Aneesh Kumar K.V" <aneesh.kumar at linux.vnet.ibm.com>
>> >>
>> >> We need to use smb_rmb when looking at hpte slot array. Otherwise we could
>> >> reorder the hpte_slot array load bfore even we marked the pmd trans huge.
>> >
>> > Does this need to go back into the stable series?
>> >
>>
>> No the changes are not yet upstream. hpte_slot_array changes are in the
>> THP series. I didn't want to post the entire series again with the
>> above two patches.
>
> Note that any patch that adds such a rmb should have a very clear
> description of what is the corresponding wmb. It's almost never right to
> have one without the other. IE. What is it that you are ordering
> against.
Will update the commit message. Some of that smb_wmb() are in the
core THP, and the others in ppc64 code. Will update with more info.
When we deposit pgtable we use pgtable_trans_huge_deposit that calls
related smb_wmb(). When we read pgtable via pgtable_trans_huge_withdraw,
core THP code does the related smb_wmb() after setting the right
PTE information in the pgtable.
-aneesh
More information about the Linuxppc-dev
mailing list