Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1709474

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

From "Kirill A. Shutemov" <kirill@shutemov.name>
Newsgroups linux.kernel
Subject Re: [tip:x86/platform] x86/hyper-v: Use hypercall for remote TLB flush
Date 2017-08-11 13:30 +0200
Message-ID <udgiB-2Us-15@gated-at.bofh.it> (permalink)
References (3 earlier) <ud1jA-1EN-23@gated-at.bofh.it> <ud1jA-1EN-25@gated-at.bofh.it> <ud1jA-1EN-21@gated-at.bofh.it> <ude78-1CC-13@gated-at.bofh.it> <ude78-1CC-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Aug 11, 2017 at 11:03:36AM +0200, Peter Zijlstra wrote:
> On Fri, Aug 11, 2017 at 01:15:18AM +0000, 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.
> > > >
> > > > HvFlushVirtualAddressListEx() refers to HvFlushVirtualAddressList() as adding
> > > > sparse target VP lists.
> > > >
> > > > Is this enough of a guarantee, or do you see other races?
> > > 
> > > That's nowhere near enough. We need the remote CPU to have completed any
> > > guest IF section that was in progress at the time of the call.
> > > 
> > > So if a host IPI can interrupt a guest while the guest has IF cleared, and we then
> > > process the host IPI -- clear the TLBs -- before resuming the guest, which still has
> > > IF cleared, we've got a problem.
> > > 
> > > Because at that point, our software page-table walker, that relies on IF being
> > > clear to guarantee the page-tables exist, because it holds off the TLB invalidate
> > > and thereby the freeing of the pages, gets its pages ripped out from under it.
> > 
> > I see, IF is used as a locking mechanism for the pages. Would
> > CONFIG_HAVE_RCU_TABLE_FREE be an option for x86? There are caveats
> > (statically enabled, RCU for page-free), yet if the resulting perf is
> > still a gain it would be worthwhile for Hyper-V targeted kernels.
> 
> 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.
> 
> Kirill would you have any opinions?

I guess we can try this. The main question is what would be performance
implications of such move.

-- 
 Kirill A. Shutemov

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v10 0/9] Hyper-V: paravirtualized remote TLB flushing and hypercall improvements Vitaly Kuznetsov <vkuznets@redhat.com> - 2017-08-02 18:10 +0200
  [PATCH v10 1/9] x86/hyper-v: include hyperv/ only when CONFIG_HYPERV is set Vitaly Kuznetsov <vkuznets@redhat.com> - 2017-08-02 18:10 +0200
    [tip:x86/platform] x86/hyper-v: Include hyperv/ only when  CONFIG_HYPERV is set tip-bot for Vitaly Kuznetsov <tipbot@zytor.com> - 2017-08-10 18:50 +0200
  [PATCH v10 3/9] x86/hyper-v: fast hypercall implementation Vitaly Kuznetsov <vkuznets@redhat.com> - 2017-08-02 18:10 +0200
    [tip:x86/platform] x86/hyper-v: Introduce fast hypercall  implementation tip-bot for Vitaly Kuznetsov <tipbot@zytor.com> - 2017-08-10 18:50 +0200
  [PATCH v10 7/9] x86/hyper-v: use hypercall for remote TLB flush Vitaly Kuznetsov <vkuznets@redhat.com> - 2017-08-02 18:20 +0200
    [tip:x86/platform] x86/hyper-v: Use hypercall for remote TLB flush tip-bot for Vitaly Kuznetsov <tipbot@zytor.com> - 2017-08-10 18:50 +0200
    [tip:x86/platform] x86/hyper-v: Use hypercall for remote TLB flush tip-bot for Vitaly Kuznetsov <tipbot@zytor.com> - 2017-08-10 20:30 +0200
      Re: [tip:x86/platform] x86/hyper-v: Use hypercall for remote TLB  flush Peter Zijlstra <peterz@infradead.org> - 2017-08-10 21:00 +0200
        Re: [tip:x86/platform] x86/hyper-v: Use hypercall for remote TLB  flush Peter Zijlstra <peterz@infradead.org> - 2017-08-10 21:30 +0200
          Re: [tip:x86/platform] x86/hyper-v: Use hypercall for remote TLB  flush Peter Zijlstra <peterz@infradead.org> - 2017-08-11 11:10 +0200
            Re: [tip:x86/platform] x86/hyper-v: Use hypercall for remote TLB  flush "Kirill A. Shutemov" <kirill@shutemov.name> - 2017-08-11 13:30 +0200
            Re: [tip:x86/platform] x86/hyper-v: Use hypercall for remote TLB flush Linus Torvalds <torvalds@linux-foundation.org> - 2017-08-11 18:20 +0200
              Re: [tip:x86/platform] x86/hyper-v: Use hypercall for remote TLB  flush Peter Zijlstra <peterz@infradead.org> - 2017-08-11 18:30 +0200
          Re: [tip:x86/platform] x86/hyper-v: Use hypercall for remote TLB flush Vitaly Kuznetsov <vkuznets@redhat.com> - 2017-08-11 11:30 +0200
            Re: [tip:x86/platform] x86/hyper-v: Use hypercall for remote TLB  flush Peter Zijlstra <peterz@infradead.org> - 2017-08-11 13:00 +0200
              Re: [Xen-devel] [tip:x86/platform] x86/hyper-v: Use hypercall for  remote TLB flush Andrew Cooper <andrew.cooper3@citrix.com> - 2017-08-11 13:10 +0200
                Re: [Xen-devel] [tip:x86/platform] x86/hyper-v: Use hypercall for  remote TLB flush Peter Zijlstra <peterz@infradead.org> - 2017-08-11 14:10 +0200
              Re: [tip:x86/platform] x86/hyper-v: Use hypercall for remote TLB  flush Juergen Gross <jgross@suse.com> - 2017-08-11 14:30 +0200
                Re: [tip:x86/platform] x86/hyper-v: Use hypercall for remote TLB  flush Peter Zijlstra <peterz@infradead.org> - 2017-08-11 14:40 +0200
                Re: [tip:x86/platform] x86/hyper-v: Use hypercall for remote TLB  flush Juergen Gross <jgross@suse.com> - 2017-08-11 14:50 +0200
                Re: [tip:x86/platform] x86/hyper-v: Use hypercall for remote TLB  flush Peter Zijlstra <peterz@infradead.org> - 2017-08-11 15:00 +0200
                Re: [tip:x86/platform] x86/hyper-v: Use hypercall for remote TLB  flush Juergen Gross <jgross@suse.com> - 2017-08-11 15:10 +0200
                Re: [tip:x86/platform] x86/hyper-v: Use hypercall for remote TLB  flush Peter Zijlstra <peterz@infradead.org> - 2017-08-11 15:50 +0200
  [PATCH v10 4/9] hyper-v: use fast hypercall for HVCALL_SIGNAL_EVENT Vitaly Kuznetsov <vkuznets@redhat.com> - 2017-08-02 18:20 +0200
    [tip:x86/platform] hyper-v: Use fast hypercall for  HVCALL_SIGNAL_EVENT tip-bot for Vitaly Kuznetsov <tipbot@zytor.com> - 2017-08-10 18:50 +0200
  [PATCH v10 5/9] x86/hyper-v: implement rep hypercalls Vitaly Kuznetsov <vkuznets@redhat.com> - 2017-08-02 18:20 +0200
    [tip:x86/platform] x86/hyper-v: Implement rep hypercalls tip-bot for Vitaly Kuznetsov <tipbot@zytor.com> - 2017-08-10 18:50 +0200
  [PATCH v10 8/9] x86/hyper-v: support extended CPU ranges for TLB flush hypercalls Vitaly Kuznetsov <vkuznets@redhat.com> - 2017-08-02 18:20 +0200
  [PATCH v10 9/9] tracing/hyper-v: trace hyperv_mmu_flush_tlb_others() Vitaly Kuznetsov <vkuznets@redhat.com> - 2017-08-02 18:20 +0200
  [PATCH v10 6/9] hyper-v: globalize vp_index Vitaly Kuznetsov <vkuznets@redhat.com> - 2017-08-02 18:20 +0200
    [tip:x86/platform] hyper-v: Globalize vp_index tip-bot for Vitaly Kuznetsov <tipbot@zytor.com> - 2017-08-10 18:50 +0200
  Re: [PATCH v10 0/9] Hyper-V: paravirtualized remote TLB flushing and hypercall improvements Vitaly Kuznetsov <vkuznets@redhat.com> - 2017-08-10 14:00 +0200
    Re: [PATCH v10 0/9] Hyper-V: paravirtualized remote TLB flushing and  hypercall improvements Ingo Molnar <mingo@kernel.org> - 2017-08-10 17:20 +0200
      Re: [PATCH v10 0/9] Hyper-V: paravirtualized remote TLB flushing and hypercall improvements Vitaly Kuznetsov <vkuznets@redhat.com> - 2017-08-10 17:20 +0200
  Re: [PATCH v10 0/9] Hyper-V: paravirtualized remote TLB flushing and hypercall improvements Vitaly Kuznetsov <vkuznets@redhat.com> - 2017-08-10 19:10 +0200

csiph-web