Re: [PATCH 8/9] x86/tlb: Privatize cpu_tlbstate

2019-06-25 Thread Andy Lutomirski
On Tue, Jun 25, 2019 at 2:52 PM Dave Hansen wrote: > > On 6/12/19 11:48 PM, Nadav Amit wrote: > > cpu_tlbstate is mostly private and only the variable is_lazy is shared. > > This causes some false-sharing when TLB flushes are performed. > > Presumably, all CPUs doing TLB flushes read 'is_lazy'.

Re: [PATCH 8/9] x86/tlb: Privatize cpu_tlbstate

2019-06-25 Thread Nadav Amit
> On Jun 25, 2019, at 2:52 PM, Dave Hansen wrote: > > On 6/12/19 11:48 PM, Nadav Amit wrote: >> cpu_tlbstate is mostly private and only the variable is_lazy is shared. >> This causes some false-sharing when TLB flushes are performed. > > Presumably, all CPUs doing TLB flushes read 'is_lazy'.

Re: [PATCH 8/9] x86/tlb: Privatize cpu_tlbstate

2019-06-25 Thread Dave Hansen
On 6/12/19 11:48 PM, Nadav Amit wrote: > cpu_tlbstate is mostly private and only the variable is_lazy is shared. > This causes some false-sharing when TLB flushes are performed. Presumably, all CPUs doing TLB flushes read 'is_lazy'. Because of this, when we write to it we have to do the cache

Re: [PATCH 8/9] x86/tlb: Privatize cpu_tlbstate

2019-06-17 Thread Nadav Amit
> On Jun 14, 2019, at 8:58 AM, Sean Christopherson > wrote: > > On Wed, Jun 12, 2019 at 11:48:12PM -0700, Nadav Amit wrote: >> diff --git a/arch/x86/include/asm/tlbflush.h >> b/arch/x86/include/asm/tlbflush.h >> index 79272938cf79..a1fea36d5292 100644 >> --- a/arch/x86/include/asm/tlbflush.h

Re: [PATCH 8/9] x86/tlb: Privatize cpu_tlbstate

2019-06-14 Thread Sean Christopherson
On Wed, Jun 12, 2019 at 11:48:12PM -0700, Nadav Amit wrote: > diff --git a/arch/x86/include/asm/tlbflush.h b/arch/x86/include/asm/tlbflush.h > index 79272938cf79..a1fea36d5292 100644 > --- a/arch/x86/include/asm/tlbflush.h > +++ b/arch/x86/include/asm/tlbflush.h ... > @@ -439,6 +442,7 @@ static

[PATCH 8/9] x86/tlb: Privatize cpu_tlbstate

2019-06-13 Thread Nadav Amit
cpu_tlbstate is mostly private and only the variable is_lazy is shared. This causes some false-sharing when TLB flushes are performed. Break cpu_tlbstate intro cpu_tlbstate and cpu_tlbstate_shared, and mark each one accordingly. Cc: Dave Hansen Cc: Andy Lutomirski Cc: Peter Zijlstra