Re: [tip:x86/platform] x86/hyper-v: Use hypercall for remote TLB flush

2017-08-17 Thread Vitaly Kuznetsov
Boris Ostrovsky writes: > On 08/16/2017 12:42 PM, Vitaly Kuznetsov wrote: >> Vitaly Kuznetsov writes: >> >>> In case we decide to go HAVE_RCU_TABLE_FREE for all PARAVIRT-enabled >>> kernels (as it seems to be the easiest/fastest way to fix Xen PV) - what >>> do you think about the required testi

Re: [tip:x86/platform] x86/hyper-v: Use hypercall for remote TLB flush

2017-08-16 Thread Boris Ostrovsky
On 08/16/2017 12:42 PM, Vitaly Kuznetsov wrote: > Vitaly Kuznetsov writes: > >> Peter Zijlstra writes: >> >>> On Fri, Aug 11, 2017 at 09:16:29AM -0700, Linus Torvalds wrote: On Fri, Aug 11, 2017 at 2:03 AM, Peter Zijlstra wrote: > I'm sure we talked about using HAVE_RCU_TABLE_FREE

Re: [tip:x86/platform] x86/hyper-v: Use hypercall for remote TLB flush

2017-08-16 Thread Vitaly Kuznetsov
Vitaly Kuznetsov writes: > Peter Zijlstra writes: > >> On Fri, Aug 11, 2017 at 09:16:29AM -0700, Linus Torvalds wrote: >>> On Fri, Aug 11, 2017 at 2:03 AM, Peter Zijlstra >>> wrote: >>> > >>> > I'm sure we talked about using HAVE_RCU_TABLE_FREE for x86 (and yes that >>> > would make it work ag

Re: [Xen-devel] [tip:x86/platform] x86/hyper-v: Use hypercall for remote TLB flush

2017-08-15 Thread Steven Rostedt
On Fri, 11 Aug 2017 14:07:14 +0200 Peter Zijlstra wrote: > It goes like: > > CPU0CPU1 > > unhook page > cli > traverse page tables > TLB invalidate ---> > sti >

Re: [tip:x86/platform] x86/hyper-v: Use hypercall for remote TLB flush

2017-08-14 Thread Vitaly Kuznetsov
Peter Zijlstra writes: > On Fri, Aug 11, 2017 at 09:16:29AM -0700, Linus Torvalds wrote: >> On Fri, Aug 11, 2017 at 2:03 AM, Peter Zijlstra wrote: >> > >> > I'm sure we talked about using HAVE_RCU_TABLE_FREE for x86 (and yes that >> > would make it work again), but this was some years ago and I

Re: [tip:x86/platform] x86/hyper-v: Use hypercall for remote TLB flush

2017-08-11 Thread Peter Zijlstra
On Fri, Aug 11, 2017 at 09:16:29AM -0700, Linus Torvalds wrote: > On Fri, Aug 11, 2017 at 2:03 AM, Peter Zijlstra wrote: > > > > I'm sure we talked about using HAVE_RCU_TABLE_FREE for x86 (and yes that > > would make it work again), but this was some years ago and I cannot > > readily find those e

Re: [tip:x86/platform] x86/hyper-v: Use hypercall for remote TLB flush

2017-08-11 Thread Linus Torvalds
On Fri, Aug 11, 2017 at 2:03 AM, Peter Zijlstra wrote: > > I'm sure we talked about using HAVE_RCU_TABLE_FREE for x86 (and yes that > would make it work again), but this was some years ago and I cannot > readily find those emails. I think the only time we really talked about HAVE_RCU_TABLE_FREE f

Re: [tip:x86/platform] x86/hyper-v: Use hypercall for remote TLB flush

2017-08-11 Thread Peter Zijlstra
On Fri, Aug 11, 2017 at 03:07:29PM +0200, Juergen Gross wrote: > On 11/08/17 14:54, Peter Zijlstra wrote: > > On Fri, Aug 11, 2017 at 02:46:41PM +0200, Juergen Gross wrote: > >> Aah, okay. Now I understand the problem. The TLB isn't the issue but the > >> IPI is serving two purposes here: TLB flush

Re: [tip:x86/platform] x86/hyper-v: Use hypercall for remote TLB flush

2017-08-11 Thread Juergen Gross
On 11/08/17 14:54, Peter Zijlstra wrote: > On Fri, Aug 11, 2017 at 02:46:41PM +0200, Juergen Gross wrote: >> Aah, okay. Now I understand the problem. The TLB isn't the issue but the >> IPI is serving two purposes here: TLB flushing (which is allowed to >> happen at any time) and serialization regar

Re: [tip:x86/platform] x86/hyper-v: Use hypercall for remote TLB flush

2017-08-11 Thread Peter Zijlstra
On Fri, Aug 11, 2017 at 02:46:41PM +0200, Juergen Gross wrote: > Aah, okay. Now I understand the problem. The TLB isn't the issue but the > IPI is serving two purposes here: TLB flushing (which is allowed to > happen at any time) and serialization regarding access to critical pages > (which seems t

Re: [tip:x86/platform] x86/hyper-v: Use hypercall for remote TLB flush

2017-08-11 Thread Juergen Gross
On 11/08/17 14:35, Peter Zijlstra wrote: > On Fri, Aug 11, 2017 at 02:22:25PM +0200, Juergen Gross wrote: >> Wait - the TLB can be cleared at any time, as Andrew was pointing out. >> No cpu can rely on an address being accessible just because IF is being >> cleared. All that matters is the existing

Re: [tip:x86/platform] x86/hyper-v: Use hypercall for remote TLB flush

2017-08-11 Thread Peter Zijlstra
On Fri, Aug 11, 2017 at 02:22:25PM +0200, Juergen Gross wrote: > Wait - the TLB can be cleared at any time, as Andrew was pointing out. > No cpu can rely on an address being accessible just because IF is being > cleared. All that matters is the existing and valid page table entry. > > So clearing

Re: [tip:x86/platform] x86/hyper-v: Use hypercall for remote TLB flush

2017-08-11 Thread Juergen Gross
On 11/08/17 12:56, Peter Zijlstra wrote: > On Fri, Aug 11, 2017 at 11:23:10AM +0200, Vitaly Kuznetsov wrote: >> Peter Zijlstra writes: >> >>> On Thu, Aug 10, 2017 at 07:08:22PM +, Jork Loeser wrote: >>> >>>>>> Subject: Re: [tip:x86/platform

Re: [Xen-devel] [tip:x86/platform] x86/hyper-v: Use hypercall for remote TLB flush

2017-08-11 Thread Peter Zijlstra
On Fri, Aug 11, 2017 at 12:05:45PM +0100, Andrew Cooper wrote: > >> Oh, I see your concern. Hyper-V, however, is not the first x86 > >> hypervisor trying to avoid IPIs on remote TLB flush, Xen does this > >> too. Briefly looking at xen_flush_tlb_others() I don't see anything > >> special, do we kno

Re: [tip:x86/platform] x86/hyper-v: Use hypercall for remote TLB flush

2017-08-11 Thread Kirill A. Shutemov
On Fri, Aug 11, 2017 at 11:03:36AM +0200, Peter Zijlstra wrote: > On Fri, Aug 11, 2017 at 01:15:18AM +, Jork Loeser wrote: > > > > > HvFlushVirtualAddressList() states: > > > > This call guarantees that by the time control returns back to the > > > > caller, the observable effects of all flush

Re: [Xen-devel] [tip:x86/platform] x86/hyper-v: Use hypercall for remote TLB flush

2017-08-11 Thread Andrew Cooper
On 11/08/17 11:56, Peter Zijlstra wrote: > On Fri, Aug 11, 2017 at 11:23:10AM +0200, Vitaly Kuznetsov wrote: >> Peter Zijlstra writes: >> >>> On Thu, Aug 10, 2017 at 07:08:22PM +, Jork Loeser wrote: >>> >>>>>> Subject: Re: [tip:x86/platform

Re: [tip:x86/platform] x86/hyper-v: Use hypercall for remote TLB flush

2017-08-11 Thread Peter Zijlstra
On Fri, Aug 11, 2017 at 11:23:10AM +0200, Vitaly Kuznetsov wrote: > Peter Zijlstra writes: > > > On Thu, Aug 10, 2017 at 07:08:22PM +, Jork Loeser wrote: > > > >> > > Subject: Re: [tip:x86/platform] x86/hyper-v: Use hypercall for remote > >> &g

Re: [tip:x86/platform] x86/hyper-v: Use hypercall for remote TLB flush

2017-08-11 Thread Vitaly Kuznetsov
Peter Zijlstra writes: > On Thu, Aug 10, 2017 at 07:08:22PM +, Jork Loeser wrote: > >> > > Subject: Re: [tip:x86/platform] x86/hyper-v: Use hypercall for remote >> > > TLB flush >> >> > > Hold on.. if we don't IPI for TLB invalidation. W

Re: [tip:x86/platform] x86/hyper-v: Use hypercall for remote TLB flush

2017-08-11 Thread Peter Zijlstra
On Fri, Aug 11, 2017 at 01:15:18AM +, Jork Loeser wrote: > > > HvFlushVirtualAddressList() states: > > > This call guarantees that by the time control returns back to the > > > caller, the observable effects of all flushes on the specified virtual > > > processors have occurred. > > > > > > Hv

RE: [tip:x86/platform] x86/hyper-v: Use hypercall for remote TLB flush

2017-08-10 Thread Jork Loeser
t; h...@zytor.com; vkuzn...@redhat.com; linux-kernel@vger.kernel.org; > rost...@goodmis.org; andy.shevche...@gmail.com; t...@linutronix.de; > mi...@kernel.org; linux-tip-comm...@vger.kernel.org > Subject: Re: [tip:x86/platform] x86/hyper-v: Use hypercall for remote TLB > flush > > > >

Re: [tip:x86/platform] x86/hyper-v: Use hypercall for remote TLB flush

2017-08-10 Thread Peter Zijlstra
On Thu, Aug 10, 2017 at 07:08:22PM +, Jork Loeser wrote: > > > Subject: Re: [tip:x86/platform] x86/hyper-v: Use hypercall for remote TLB > > > flush > > > > Hold on.. if we don't IPI for TLB invalidation. What serializes our > > &g

RE: [tip:x86/platform] x86/hyper-v: Use hypercall for remote TLB flush

2017-08-10 Thread Jork Loeser
inger ; torvalds@linux- > > foundation.org; l...@kernel.org; h...@zytor.com; vkuzn...@redhat.com; > > linux-kernel@vger.kernel.org; rost...@goodmis.org; > > andy.shevche...@gmail.com; t...@linutronix.de; KY Srinivasan > > ; mi...@kernel.org > > Cc: linux-tip-comm

RE: [tip:x86/platform] x86/hyper-v: Use hypercall for remote TLB flush

2017-08-10 Thread KY Srinivasan
.@redhat.com; > linux-kernel@vger.kernel.org; rost...@goodmis.org; > andy.shevche...@gmail.com; t...@linutronix.de; KY Srinivasan > ; mi...@kernel.org > Cc: linux-tip-comm...@vger.kernel.org > Subject: Re: [tip:x86/platform] x86/hyper-v: Use hypercall for remote TLB > flush >

Re: [tip:x86/platform] x86/hyper-v: Use hypercall for remote TLB flush

2017-08-10 Thread Peter Zijlstra
On Thu, Aug 10, 2017 at 11:21:49AM -0700, tip-bot for Vitaly Kuznetsov wrote: > Commit-ID: 2ffd9e33ce4af4e8cfa3e17bf493defe8474e2eb > Gitweb: http://git.kernel.org/tip/2ffd9e33ce4af4e8cfa3e17bf493defe8474e2eb > Author: Vitaly Kuznetsov > AuthorDate: Wed, 2 Aug 2017 18:09:19 +0200 > Commit

[tip:x86/platform] x86/hyper-v: Use hypercall for remote TLB flush

2017-08-10 Thread tip-bot for Vitaly Kuznetsov
Commit-ID: 2ffd9e33ce4af4e8cfa3e17bf493defe8474e2eb Gitweb: http://git.kernel.org/tip/2ffd9e33ce4af4e8cfa3e17bf493defe8474e2eb Author: Vitaly Kuznetsov AuthorDate: Wed, 2 Aug 2017 18:09:19 +0200 Committer: Ingo Molnar CommitDate: Thu, 10 Aug 2017 20:16:44 +0200 x86/hyper-v: Use hyperca

[tip:x86/platform] x86/hyper-v: Use hypercall for remote TLB flush

2017-08-10 Thread tip-bot for Vitaly Kuznetsov
Commit-ID: 88b46342eb037d35decda4d651cfee5216f4f822 Gitweb: http://git.kernel.org/tip/88b46342eb037d35decda4d651cfee5216f4f822 Author: Vitaly Kuznetsov AuthorDate: Wed, 2 Aug 2017 18:09:19 +0200 Committer: Ingo Molnar CommitDate: Thu, 10 Aug 2017 16:50:23 +0200 x86/hyper-v: Use hyperca