> On 21 Jan 2025, at 0:44, Rik van Riel <riel@xxxxxxxxxxx> wrote: > > > If the TLB flush is about a page table change that > happened after the transition to a global ASID, > flush_tlb_mm_range() should see that global ASID, > and flush accordingly. > > What am I missing? I think reasoning needs to be done using memory ordering arguments using the kernel memory model (which builds on top of x86 memory model in our case) and when necessary “happens-before” relations. The fact one CPU sees a write does not imply another CPU will see the write by itself. So if there is some memory barriers that would prevent this scenario, it would be good to mark how they synchronize. Otherwise, I think the very least “late” TLB-shootdowns should be respected even if the ASID is already “global”. I do recommend that you would also check the opposite case where a CPU that transitioned to global ASID does broadcast and there is a strangler CPU that has not yet switched to the global one. While in that case the TLB flush would eventually take place, there might be a window of time that it is not (and the page is already freed).