On Mon, Jun 1, 2026 at 5:14 AM David Hildenbrand (Arm) [off-list ref] wrote:
On 6/1/26 12:47, Lance Yang wrote:
quoted
On 2026/6/1 18:23, David Hildenbrand (Arm) wrote:
quoted
On 6/1/26 11:08, Lance Yang wrote:
quoted
One small thing, I think we should probably keep the smp_wmb(), and just
move it before the earlier pmd_populate().
IIUC, the ordering we want is still:
clear old PTEs
smp_wmb()
pmd_populate()
so another CPU cannot walk through the re-installed PMD and still observe
the old PTEs, right?
There is a smp_wmb() in __folio_mark_uptodate(), that should be sufficient?
Ah, cool! __folio_mark_uptodate() already does the job :P
So yeah, no extra smp_wmb() needed here!
Yeah. BTW, I think we'd need a spin_lock_nested(), so @Nico, treat my code as a
draft.
Okay, I read the above and did some investigating.
I will try to implement and verify the changes you suggested :)
Or an even crazier idea... what if we ensure MIPS checks for PMD_none
before walking a PTE table?
-- Nico
--
Cheers,
David