Re: [PATCH v5 10/12] x86,tlb: do targeted broadcast flushing from tlbbatch code
From: Rik van Riel
Date: Mon Jan 20 2025 - 11:15:20 EST
On Mon, 2025-01-20 at 16:14 +0200, Nadav Amit wrote:
>
> I am not sure we are on the same page. What I suggested is:
>
> 1. arch_tlbbatch_flush() would still do tlbsync()
> 2. No migrate_enable() in arch_tlbbatch_flush()
> 3. No migrate_disable() in arch_tlbbatch_add_pending()
> 4. arch_tlbbatch_add_pending() sets
> cpu_tlbstate.pending_tlb_broadcast
> 5. switch_mm_irqs_off() checks cpu_tlbstate.pending_tlb_broadcast and
> if
> it is set performs tlbsync and clears it.
>
How does that synchronize the page freeing (from page
reclaim) with the TLBSYNCs?
What guarantees that the page reclaim path won't free
the pages until after TLBSYNC has completed on the CPUs
that kicked off asynchronous flushes with INVPLGB?
--
All Rights Reversed.