[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c42c314c-3c1b-4e4a-803a-ecf31685d4cc@intel.com>
Date: Fri, 14 Feb 2025 11:55:38 -0800
From: Dave Hansen <dave.hansen@...el.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Rik van Riel <riel@...riel.com>, x86@...nel.org,
linux-kernel@...r.kernel.org, bp@...en8.de, dave.hansen@...ux.intel.com,
zhengqi.arch@...edance.com, nadav.amit@...il.com, thomas.lendacky@....com,
kernel-team@...a.com, linux-mm@...ck.org, akpm@...ux-foundation.org,
jackmanb@...gle.com, jannh@...gle.com, mhklinux@...look.com,
andrew.cooper3@...rix.com, Manali Shukla <Manali.Shukla@....com>
Subject: Re: [PATCH v11 06/12] x86/mm: use INVLPGB for kernel TLB flushes
On 2/14/25 11:40, Peter Zijlstra wrote:
> On Fri, Feb 14, 2025 at 10:35:40AM -0800, Dave Hansen wrote:
>> On 2/13/25 08:13, Rik van Riel wrote:
>>> - if (info->end == TLB_FLUSH_ALL)
>>> + if (broadcast_kernel_range_flush(info))
>>> + ; /* Fall through. */
>>> + else if (info->end == TLB_FLUSH_ALL)
>>> on_each_cpu(do_flush_tlb_all, NULL, 1);
>>> else
>>> on_each_cpu(do_kernel_range_flush, info, 1);
>> We've got to find a better name for broadcast_kernel_range_flush().
>> Because IPIs are broadcast too. The naming makes it confusing. Why would
>> be broadcast, and then start trying IPIs that are also broadcast?
> IIRC the more general name is indeed broadcast tlbi; as in other
> architectures use this naming to mean this very thing too.
>
> But yes, I see the confusion, but I don't think changing the naming
> really helps a lot here :-/
Fair enough. If we don't have a better name, we can at least do:
if (new_bad_name()) {
new_thing();
} else {
old_thing();
}
My real heartburn is with:
if (new_bad_name()) {
new_thing();
} else if (need_thing_1()) {
old_thing1();
} else {
old_thing2();
}
Where new and old are logically squished together.
Powered by blists - more mailing lists