[PATCH v2 2/2] powerpc/mm: Change the swap encoding in pte.

Aneesh Kumar K.V aneesh.kumar at linux.vnet.ibm.com
Thu Jun 18 15:20:46 AEST 2015


Scott Wood <scottwood at freescale.com> writes:

> On Wed, 2015-06-17 at 19:45 +1000, Michael Ellerman wrote:
>> On Wed, 2015-06-17 at 08:21 +0530, Aneesh Kumar K.V wrote:
>> > "Aneesh Kumar K.V" <aneesh.kumar at linux.vnet.ibm.com> writes:
>> > 
>> > 
>> > Hi Scott,
>> > 
>> > > Current swap encoding in pte can't support large pfns
>> > > above 4TB. Change the swap encoding such that we put
>> > > the swap type in the PTE bits. Also add build checks
>> > > to make sure we don't overlap with HPTEFLAGS.
>> > > 
>> > 
>> > Can you please review this w.r.t 64bit booke ? 
>
> It looks OK.
>
> I'm curious why _PAGE_BIT_SWAP_TYPE is 2 -- it seems like it could be 
> any value >= 1 that isn't large enough to cause a conflict. Does 
> something get stored in that second bit?

Yes, we should be able to use >= 1. But then our _PAGE_USER is also used
to indicate prot_none. It should really be _PAGE_PRESENT set and
_PAGE_USER cleared. So for the swap case we should be ok to use
_PAGE_USER. But i didn't want to audit all the asm code. So i decided to
leave _PAGE_USER as it is.


>
>> I booted it on our p5020ds FWIW.
>
> Actively using swap?
>

-aneesh



More information about the Linuxppc-dev mailing list