Re: [PATCH v2 10/12] x86/mm: Move flush_tlb_info back to the stack
From: Peter Zijlstra
Date: Mon Mar 02 2026 - 10:03:29 EST
On Mon, Mar 02, 2026 at 03:52:14PM +0800, Chuyi Zhou wrote:
> Commit 3db6d5a5ecaf ("x86/mm/tlb: Remove 'struct flush_tlb_info' from the
> stack") converted flush_tlb_info from stack variable to per-CPU variable.
> This brought about a performance improvement of around 3% in extreme test.
> However, it also required that all flush_tlb* operations keep preemption
> disabled entirely to prevent concurrent modifications of flush_tlb_info.
> flush_tlb* needs to send IPIs to remote CPUs and synchronously wait for
> all remote CPUs to complete their local TLB flushes. The process could
> take tens of milliseconds when interrupts are disabled or with a large
> number of remote CPUs.
>
> From the perspective of improving kernel real-time performance, this patch
> reverts flush_tlb_info back to stack variables. This is a preparation for
> enabling preemption during TLB flush in next patch.
This isn't properly justified. You've got to show that 'most' workloads
are not adversely affected by this.
Most people still swing towards performance most of the time.