Re: [PATCH v11 06/12] x86/mm: use INVLPGB for kernel TLB flushes

From: Peter Zijlstra
Date: Fri Feb 14 2025 - 14:40:40 EST


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 :-/