Re: [PATCH 2/5] x86/mm: Share the full TLB flush dispatch
From: Chuyi Zhou
Date: Wed Sep 23 2026 - 05:50:01 EST
Hi
On 2026-09-23 5:17 p.m., Sebastian Andrzej Siewior wrote:
> On 2026-09-21 17:53:56 [+0800], Chuyi Zhou wrote:
>> --- a/arch/x86/mm/tlb.c
>> +++ b/arch/x86/mm/tlb.c
>> @@ -1445,7 +1445,7 @@ static void do_flush_tlb_all(void *info)
>> __flush_tlb_all();
>> }
>>
>> -void flush_tlb_all(void)
>> +static void kernel_tlb_flush_all(void)
>> {
>> count_vm_tlb_event(NR_TLB_REMOTE_FLUSH);
>>
>> @@ -1457,6 +1457,11 @@ void flush_tlb_all(void)
>> on_each_cpu(do_flush_tlb_all, NULL, 1);
>> }
>>
>> +void flush_tlb_all(void)
>> +{
>> + kernel_tlb_flush_all();
>> +}
>> +
>
> Would it make sense to drop kernel_tlb_flush_all() which is used only
> here and instead keep flush_tlb_all() which has also external users?
Yes, that makes sense. flush_tlb_all() already provides the same
accounting and backend dispatch. I'll drop kernel_tlb_flush_all() and
call flush_tlb_all() directly from flush_tlb_kernel_range().
>
> Sebastian