Re: [PATCH v2] x86/mm/tlb: Remove flush_tlb_info from the stack

2019-04-26 Thread Peter Zijlstra
On Fri, Apr 26, 2019 at 08:37:37AM +, Nadav Amit wrote: > Interesting! (and thanks for the reference). Well, I said it would be quite > surprising, and I see you wrote the same thing in the patch ;-) > > But correct me if I’m wrong - it does sound as if you “screw” all the uses > of atomic_in

Re: [PATCH v2] x86/mm/tlb: Remove flush_tlb_info from the stack

2019-04-26 Thread Nadav Amit
> On Apr 26, 2019, at 12:53 AM, Peter Zijlstra wrote: > > On Thu, Apr 25, 2019 at 09:20:24PM +, Nadav Amit wrote: > >>> I think that's a bug and PeterZ is fixing those. >> >> This would be quite surprising. > > I need to get back to that percpu series :/ > >> Even atomic_dec() does n

Re: [PATCH v2] x86/mm/tlb: Remove flush_tlb_info from the stack

2019-04-26 Thread Peter Zijlstra
On Thu, Apr 25, 2019 at 09:20:24PM +, Nadav Amit wrote: > > I think that's a bug and PeterZ is fixing those. > > This would be quite surprising. I need to get back to that percpu series :/ > Even atomic_dec() does not imply a compilers > barrier. I think I should leave it as is for now

Re: [PATCH v2] x86/mm/tlb: Remove flush_tlb_info from the stack

2019-04-25 Thread Nadav Amit
> On Apr 25, 2019, at 12:48 PM, Ingo Molnar wrote: > > > * Nadav Amit wrote: > >>> On Apr 25, 2019, at 12:29 PM, Ingo Molnar wrote: >>> >>> >>> * Nadav Amit wrote: >>> Move flush_tlb_info variables off the stack. This allows to align flush_tlb_info to cache-line and avoid potent

Re: [PATCH v2] x86/mm/tlb: Remove flush_tlb_info from the stack

2019-04-25 Thread Ingo Molnar
* Nadav Amit wrote: > > On Apr 25, 2019, at 12:29 PM, Ingo Molnar wrote: > > > > > > * Nadav Amit wrote: > > > >> Move flush_tlb_info variables off the stack. This allows to align > >> flush_tlb_info to cache-line and avoid potentially unnecessary cache > >> line movements. It also allows

Re: [PATCH v2] x86/mm/tlb: Remove flush_tlb_info from the stack

2019-04-25 Thread Nadav Amit
> On Apr 25, 2019, at 12:29 PM, Ingo Molnar wrote: > > > * Nadav Amit wrote: > >> Move flush_tlb_info variables off the stack. This allows to align >> flush_tlb_info to cache-line and avoid potentially unnecessary cache >> line movements. It also allows to have a fixed virtual-to-physical >> t

Re: [PATCH v2] x86/mm/tlb: Remove flush_tlb_info from the stack

2019-04-25 Thread Ingo Molnar
* Nadav Amit wrote: > Move flush_tlb_info variables off the stack. This allows to align > flush_tlb_info to cache-line and avoid potentially unnecessary cache > line movements. It also allows to have a fixed virtual-to-physical > translation of the variables, which reduces TLB misses. > > Use

Re: [PATCH v2] x86/mm/tlb: Remove flush_tlb_info from the stack

2019-04-25 Thread Nadav Amit
> On Apr 25, 2019, at 11:08 AM, Nadav Amit wrote: > > Move flush_tlb_info variables off the stack. This allows to align > flush_tlb_info to cache-line and avoid potentially unnecessary cache > line movements. It also allows to have a fixed virtual-to-physical > translation of the variables, which

Re: [PATCH v2] x86/mm/tlb: Remove flush_tlb_info from the stack

2019-04-25 Thread Andy Lutomirski
On Thu, Apr 25, 2019 at 11:08 AM Nadav Amit wrote: > > Move flush_tlb_info variables off the stack. This allows to align > flush_tlb_info to cache-line and avoid potentially unnecessary cache > line movements. It also allows to have a fixed virtual-to-physical > translation of the variables, which

[PATCH v2] x86/mm/tlb: Remove flush_tlb_info from the stack

2019-04-25 Thread Nadav Amit
Move flush_tlb_info variables off the stack. This allows to align flush_tlb_info to cache-line and avoid potentially unnecessary cache line movements. It also allows to have a fixed virtual-to-physical translation of the variables, which reduces TLB misses. Use per-CPU struct for flush_tlb_mm_rang