On Wed, Oct 29, 2025 at 05:19:54PM +0100, David Hildenbrand wrote:
Why is a tlb_remove_table_sync_one() needed in huge_pmd_unshare()?
Because nothing else on that path is guaranteed to send any IPIs before the page table becomes reusable in another process.
I feel that David's suggestion of just disallowing the use of shared page tables like this (I mean really does it actually come up that much?) is the right one then.
Yeah, I also like that suggestion.
I started hacking on this (only found a bit of time this week), and in essence, we'll be using the mmu_gather when unsharing to collect the pages and handle the TLB flushing etc.
(TLB flushing in that hugetlb area is a mess)
It almost looks like a cleanup.
Having that said, it will take a bit longer to finish it and, of course, I first have to test it then to see if it even works.
But it looks doable. :)
Ohhhh nice :)
I look forward to it!
-- Cheers
David / dhildenb
Cheers, Lorenzo