Re: [PATCH RESEND v3 1/2] mm/tlb: skip redundant IPI when TLB flush already synchronized
From: Lance Yang
Date: Fri Jan 09 2026 - 10:37:55 EST
On 2026/1/9 22:13, David Hildenbrand (Red Hat) wrote:
What could work is tracking "tlb_table_flush_sent_ipi" really when we
are flushing the TLB for removed/unshared tables, and maybe resetting
it ... I don't know when from the top of my head.
Not sure what's the best way forward here :(
v2 was simpler IMHO.
The main concern Dave raised was that with PV hypercalls or when
INVLPGB is available, we can't tell from a static check whether IPIs
were actually sent.
Why can't we set the boolean at runtime when initializing the pv_ops
structure, when we are sure that it is allowed?
Yes, thanks, that sounds like a reasonable trade-off :)
As you mentioned:
"this lifetime stuff in core-mm ends up getting more complicated than
v2 without a clear benefit".
I totally agree that v3 is too complicated :(
But Dave's concern about v2 was that we can't accurately tell whether
IPIs were actually sent in PV environments or with INVLPGB, which
misses optimization opportunities. The INVLPGB+no_global_asid case
also sends IPIs during TLB flush.
Anyway, yeah, I'd rather start with a simple approach, even if it's
not perfect. We can always improve it later ;)
Any ideas on how to move forward?