All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: Nadav Amit <namit@vmware.com>, Andy Lutomirski <luto@kernel.org>,
	Dave Hansen <dave.hansen@linux.intel.com>
Cc: Sasha Levin <sashal@kernel.org>,
	linux-hyperv@vger.kernel.org,
	Stephen Hemminger <sthemmin@microsoft.com>,
	kvm@vger.kernel.org, Peter Zijlstra <peterz@infradead.org>,
	Haiyang Zhang <haiyangz@microsoft.com>,
	x86@kernel.org, linux-kernel@vger.kernel.org,
	virtualization@lists.linux-foundation.org,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	Paolo Bonzini <pbonzini@redhat.com>,
	xen-devel@lists.xenproject.org,
	Thomas Gleixner <tglx@linutronix.de>,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>
Subject: Re: [PATCH v3 4/9] x86/mm/tlb: Flush remote and local TLBs concurrently
Date: Fri, 26 Jul 2019 09:28:01 +0200	[thread overview]
Message-ID: <3fc06d95-5f17-4642-cd91-49a0f70057c0__14187.4375332677$1564126117$gmane$org@suse.com> (raw)
In-Reply-To: <20190719005837.4150-5-namit@vmware.com>

On 19.07.19 02:58, Nadav Amit wrote:
> To improve TLB shootdown performance, flush the remote and local TLBs
> concurrently. Introduce flush_tlb_multi() that does so. Introduce
> paravirtual versions of flush_tlb_multi() for KVM, Xen and hyper-v (Xen
> and hyper-v are only compile-tested).
> 
> While the updated smp infrastructure is capable of running a function on
> a single local core, it is not optimized for this case. The multiple
> function calls and the indirect branch introduce some overhead, and
> might make local TLB flushes slower than they were before the recent
> changes.
> 
> Before calling the SMP infrastructure, check if only a local TLB flush
> is needed to restore the lost performance in this common case. This
> requires to check mm_cpumask() one more time, but unless this mask is
> updated very frequently, this should impact performance negatively.
> 
> Cc: "K. Y. Srinivasan" <kys@microsoft.com>
> Cc: Haiyang Zhang <haiyangz@microsoft.com>
> Cc: Stephen Hemminger <sthemmin@microsoft.com>
> Cc: Sasha Levin <sashal@kernel.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Borislav Petkov <bp@alien8.de>
> Cc: x86@kernel.org
> Cc: Juergen Gross <jgross@suse.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Dave Hansen <dave.hansen@linux.intel.com>
> Cc: Andy Lutomirski <luto@kernel.org>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
> Cc: linux-hyperv@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Cc: virtualization@lists.linux-foundation.org
> Cc: kvm@vger.kernel.org
> Cc: xen-devel@lists.xenproject.org
> Signed-off-by: Nadav Amit <namit@vmware.com>
> ---
>   arch/x86/hyperv/mmu.c                 | 10 +++---
>   arch/x86/include/asm/paravirt.h       |  6 ++--
>   arch/x86/include/asm/paravirt_types.h |  4 +--
>   arch/x86/include/asm/tlbflush.h       |  8 ++---
>   arch/x86/include/asm/trace/hyperv.h   |  2 +-
>   arch/x86/kernel/kvm.c                 | 11 +++++--
>   arch/x86/kernel/paravirt.c            |  2 +-
>   arch/x86/mm/tlb.c                     | 47 ++++++++++++++++++---------
>   arch/x86/xen/mmu_pv.c                 | 11 +++----
>   include/trace/events/xen.h            |  2 +-
>   10 files changed, 62 insertions(+), 41 deletions(-)

Xen and paravirt parts: Reviewed-by: Juergen Gross <jgross@suse.com>


Juergen

  parent reply	other threads:[~2019-07-26  7:28 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-19  0:58 [PATCH v3 0/9] x86: Concurrent TLB flushes Nadav Amit
2019-07-19  0:58 ` [Xen-devel] " Nadav Amit
2019-07-19  0:58 ` [PATCH v3 1/9] smp: Run functions concurrently in smp_call_function_many() Nadav Amit
2019-07-19 18:23   ` Dave Hansen
2019-07-22 18:16     ` Peter Zijlstra
2019-07-22 18:41       ` Nadav Amit
2019-07-22 19:34         ` Peter Zijlstra
2019-07-22 18:21   ` Peter Zijlstra
2019-07-22 18:34     ` Nadav Amit
2019-07-22 19:19       ` Peter Zijlstra
2019-07-22 18:37     ` Thomas Gleixner
2019-07-22 18:40       ` Nadav Amit
2019-07-22 18:51         ` Thomas Gleixner
2019-07-22 19:02           ` Nadav Amit
2019-07-25 12:36             ` Thomas Gleixner
2019-07-25 19:10               ` Nadav Amit
2019-07-19  0:58 ` [PATCH v3 2/9] x86/mm/tlb: Remove reason as argument for flush_tlb_func_local() Nadav Amit
2019-07-19  0:58 ` [PATCH v3 3/9] x86/mm/tlb: Open-code on_each_cpu_cond_mask() for tlb_is_not_lazy() Nadav Amit
2019-07-19 18:36   ` Dave Hansen
2019-07-19 18:41     ` Nadav Amit
2019-07-19 22:44       ` Joe Perches
2019-07-19 23:02         ` Nadav Amit
2019-07-22 18:27   ` Peter Zijlstra
2019-07-22 19:47   ` Rasmus Villemoes
2019-07-22 19:51     ` Nadav Amit
2019-07-19  0:58 ` [PATCH v3 4/9] x86/mm/tlb: Flush remote and local TLBs concurrently Nadav Amit via Virtualization
2019-07-19  0:58 ` Nadav Amit
2019-07-19  0:58   ` [Xen-devel] " Nadav Amit
2019-07-22 19:14   ` Peter Zijlstra
2019-07-22 19:14     ` [Xen-devel] " Peter Zijlstra
2019-07-22 19:14     ` Peter Zijlstra
2019-07-22 19:27     ` Nadav Amit via Virtualization
2019-07-22 19:27     ` Nadav Amit
2019-07-22 19:27       ` [Xen-devel] " Nadav Amit
2019-07-22 19:32       ` Peter Zijlstra
2019-07-22 19:32         ` [Xen-devel] " Peter Zijlstra
2019-07-22 19:32         ` Peter Zijlstra
2019-07-26  7:28   ` Juergen Gross [this message]
2019-07-26  7:28   ` Juergen Gross
2019-07-26  7:28     ` [Xen-devel] " Juergen Gross
2019-07-31  0:13   ` Michael Kelley
2019-07-31  0:13     ` [Xen-devel] " Michael Kelley
2019-07-31  0:13   ` Michael Kelley via Virtualization
2019-07-19  0:58 ` [PATCH v3 5/9] x86/mm/tlb: Privatize cpu_tlbstate Nadav Amit
2019-07-19 18:38   ` Dave Hansen
2019-07-19 18:43     ` Nadav Amit
2019-07-19 18:48       ` Dave Hansen
2019-07-19 18:54         ` Nadav Amit
2019-07-20 13:58           ` Andy Lutomirski
2019-07-21 20:21     ` Nadav Amit
2019-07-19  0:58 ` [PATCH v3 6/9] x86/mm/tlb: Do not make is_lazy dirty for no reason Nadav Amit
2019-07-19  0:58 ` [PATCH v3 7/9] cpumask: Mark functions as pure Nadav Amit
2019-07-19  0:58 ` [PATCH v3 8/9] x86/mm/tlb: Remove UV special case Nadav Amit
2019-07-19  2:25   ` Mike Travis
2019-07-19  4:58     ` Nadav Amit
2019-07-31  3:11     ` Nadav Amit
2019-07-19  0:58 ` [PATCH v3 9/9] x86/mm/tlb: Remove unnecessary uses of the inline keyword Nadav Amit
2019-07-19 21:36 ` [PATCH v3 0/9] x86: Concurrent TLB flushes Dave Hansen
2019-07-19 21:36   ` [Xen-devel] " Dave Hansen
2019-07-19 21:36 ` Dave Hansen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='3fc06d95-5f17-4642-cd91-49a0f70057c0__14187.4375332677$1564126117$gmane$org@suse.com' \
    --to=jgross@suse.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=haiyangz@microsoft.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@redhat.com \
    --cc=namit@vmware.com \
    --cc=pbonzini@redhat.com \
    --cc=peterz@infradead.org \
    --cc=sashal@kernel.org \
    --cc=sthemmin@microsoft.com \
    --cc=tglx@linutronix.de \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=x86@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.