[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f45a1760-7fa6-4e2c-ba5a-90e250a5792a@linux.dev>
Date: Fri, 9 Jan 2026 23:30:51 +0800
From: Lance Yang <lance.yang@...ux.dev>
To: "David Hildenbrand (Red Hat)" <david@...nel.org>, dave.hansen@...el.com
Cc: dave.hansen@...ux.intel.com, will@...nel.org, aneesh.kumar@...nel.org,
npiggin@...il.com, peterz@...radead.org, tglx@...utronix.de,
mingo@...hat.com, bp@...en8.de, x86@...nel.org, hpa@...or.com,
arnd@...db.de, akpm@...ux-foundation.org, lorenzo.stoakes@...cle.com,
ziy@...dia.com, baolin.wang@...ux.alibaba.com, Liam.Howlett@...cle.com,
npache@...hat.com, ryan.roberts@....com, dev.jain@....com,
baohua@...nel.org, shy828301@...il.com, riel@...riel.com, jannh@...gle.com,
linux-arch@...r.kernel.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, ioworker0@...il.com
Subject: Re: [PATCH RESEND v3 1/2] mm/tlb: skip redundant IPI when TLB flush
already synchronized
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?
Powered by blists - more mailing lists