[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <31ef1305-1fd4-8159-a2ca-e9968a568ff0@csgroup.eu>
Date: Thu, 8 Oct 2020 11:49:23 +0200
From: Christophe Leroy <christophe.leroy@...roup.eu>
To: linux-mm <linux-mm@...ck.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
"Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>,
Nicholas Piggin <npiggin@...il.com>
Subject: mm: Question about the use of 'accessed' flags and pte_young() helper
In a 10 years old commit
(https://github.com/linuxppc/linux/commit/d069cb4373fe0d451357c4d3769623a7564dfa9f), powerpc 8xx has
made the handling of PTE accessed bit conditional to CONFIG_SWAP.
Since then, this has been extended to some other powerpc variants.
That commit means that when CONFIG_SWAP is not selected, the accessed bit is not set by SW TLB miss
handlers, leading to pte_young() returning garbage, or should I say possibly returning false
allthough a page has been accessed since its access flag was reset.
Looking at various mm/ places, pte_young() is used independent of CONFIG_SWAP
Is it still valid the not manage accessed flags when CONFIG_SWAP is not selected ?
If yes, should pte_young() always return true in that case ?
While we are at it, I'm wondering whether powerpc should redefine arch_faults_on_old_pte()
On some variants of powerpc, accessed flag is managed by HW. On others, it is managed by SW TLB miss
handlers via page fault handling.
Thanks
Christophe
Powered by blists - more mailing lists