[Regression 5.7-rc1] Random hangs on 32-bit PowerPC (PowerBook6,7)

Aneesh Kumar K.V aneesh.kumar at linux.ibm.com
Thu May 21 00:29:36 AEST 2020


On 5/20/20 7:23 PM, Christophe Leroy wrote:
> 
> 
> Le 20/05/2020 à 15:43, Aneesh Kumar K.V a écrit :
>> Christophe Leroy <christophe.leroy at csgroup.eu> writes:
>>
>>> Le 18/05/2020 à 17:19, Rui Salvaterra a écrit :
>>>> Hi again, Christophe,
>>>>
>>>> On Mon, 18 May 2020 at 15:03, Christophe Leroy
>>>> <christophe.leroy at csgroup.eu> wrote:
>>>>>
>>>>> Can you try reverting 697ece78f8f749aeea40f2711389901f0974017a ? It 
>>>>> may
>>>>> have broken swap.
>>>>
>>>> Yeah, that was a good call. :) Linux 5.7-rc1 with the revert on top
>>>> survives the beating. I'll be happy to test a definitive patch!
>>>>
>>>
>>> Yeah I discovered recently that the way swap is implemented on powerpc
>>> expects RW and other important bits not be one of the 3 least
>>> significant bits (see __pte_to_swp_entry() )
>>
>> The last 3 bits are there to track the _PAGE_PRESENT right? What is the
>> RW dependency there? Are you suggesting of read/write migration entry?
>> A swap entry should not retain the pte rw bits right?
>>
>> A swap entry is built using swap type + offset. And it should not have a
>> dependency on pte RW bits. Along with type and offset we also should
>> have the ability to mark it as a pte entry and also set not present
>> bits. With that understanding what am I missing here?
> 
> That's probably me who is missing something, I have not digged into the 
> swap functionning yet indeed, so that was only my first feeling.
> 
> By the way, the problems is definitely due to the order changes in the 
> PTE bits, whether that's because _PAGE_RW was moved to the last 3 bits 
> or whether that's because _PAGE_PRESENT was moved out of the last 3 
> bits, I don't know yet.
> 
> My (bad) understanding is from the fact that  __pte_to_swp_entry() is a 
> right shift by 3 bits, so it looses the last 3 bits, and therefore 
> __swp_entry_to_pte(__pte_to_swp_entry(pte)) looses the last 3 bits of a 
> PTE.
> 
> Is there somewhere a description of how swap works exactly ?
> 

Looking at  __set_pte_at(), I am wondering whether this was due to 
_PAGE_HASHPTE? . This would mean we end up wrongly updating some swap 
entry details. We call set_pte_at() on swap pte entries.

-aneesh





More information about the Linuxppc-dev mailing list