Re: [patch 51/60] x86/mm: Allow flushing for future ASID switches
From: Peter Zijlstra
Date: Mon Dec 04 2017 - 18:07:58 EST
On Mon, Dec 04, 2017 at 02:54:46PM -0800, Andy Lutomirski wrote:
> On Mon, Dec 4, 2017 at 2:47 PM, Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
> > As is __flush_tlb_single() does user and __flush_tlb_one() does
> > user+kernel.
>
> Yep. A one-liner above the function to that effect would make it
> *way* clearer what's going on.
Bah, since my notes are upstairs I actually got that wrong,
do_kernel_range_flush() also uses __flush_tlb_single(), but then it
finishes with invalidate_pcid_other(), so effectively it shoots down
world.
So we should probably switch do_kernel_range_flush() to
__flush_tlb_one() and tlb_uv.c (pending SGI approval) to
__flush_tlb_single().
I'll dig through my notes in the morning and do a patch with comments.