Re: [PATCH 6/6] x86/mm/kaiser: Optimize __native_flush_tlb
From: Peter Zijlstra
Date: Thu Nov 30 2017 - 08:14:23 EST
On Thu, Nov 30, 2017 at 01:43:19PM +0100, Peter Zijlstra wrote:
> Now the problem is that flush_tlb_kernel_range() is implemented using
> either __flush_tlb_all() or __flush_tlb_single(), and it is that last
> use that is buggered.
>
> So at the very least we need the below to cure things, but there is
> another inconsistency; do_flush_tlb_all() is used by both
> flush_tlb_all() and flush_tlb_kernel_range() and increments NR_TLB_*,
> do_kernel_range_flush() OTOH does not increment NR_TLB_*. I'm not fixing
> that, but I'll leave a comment around or something, so we can later try
> and figure out what exact statistics we want.
Alternatively, we'd simply kill the entire invlpg path for
flush_tlb_kernel_range() and simply do __flush_tlb_all().