[PATCH v5 0/8] x86/tlb: Concurrent TLB flushes

2021-02-09 Thread Nadav Amit
From: Nadav Amit This is a respin of a rebased version of an old series, which I did not follow, as I was preoccupied with personal issues (sorry). The series improve TLB shootdown by flushing the local TLB concurrently with remote TLBs, overlapping the IPI delivery time with the local flush

[PATCH v5 4/8] x86/mm/tlb: Flush remote and local TLBs concurrently

2021-02-09 Thread Nadav Amit
From: Nadav Amit 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

Re: [PATCH v5 4/8] x86/mm/tlb: Flush remote and local TLBs concurrently

2021-02-16 Thread Nadav Amit
> On Feb 16, 2021, at 4:10 AM, Peter Zijlstra wrote: > > On Tue, Feb 09, 2021 at 02:16:49PM -0800, Nadav Amit wrote: >> @@ -816,8 +821,8 @@ STATIC_NOPV void native_flush_tlb_others(const struct >> cpumask *cpumask, >> * doing a speculative memory access. &

[PATCH v6 0/9] x86/tlb: Concurrent TLB flushes

2021-02-20 Thread Nadav Amit
From: Nadav Amit The series improves TLB shootdown by flushing the local TLB concurrently with remote TLBs, overlapping the IPI delivery time with the local flush. Performance numbers can be found in the previous version [1]. v5 was rebased on 5.11 (long time after v4), and had some bugs and

[PATCH v6 4/9] x86/mm/tlb: Flush remote and local TLBs concurrently

2021-02-20 Thread Nadav Amit
From: Nadav Amit 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

Re: [Pv-drivers] [PATCH 29/36] cpuidle, xenpv: Make more PARAVIRT_XXL noinstr clean

2022-06-13 Thread Nadav Amit
On Jun 13, 2022, at 11:48 AM, Srivatsa S. Bhat wrote: > ⚠ External Email > > On 6/8/22 4:27 PM, Peter Zijlstra wrote: >> vmlinux.o: warning: objtool: acpi_idle_enter_s2idle+0xde: call to wbinvd() >> leaves .noinstr.text section >> vmlinux.o: warning: objtool: default_idle+0x4: call to arch_safe

Re: [Xen-devel] [PATCH RFC 0/6] mm/kdump: allow to exclude pages that are logically offline

2018-11-14 Thread Nadav Amit
From: David Hildenbrand Sent: November 14, 2018 at 9:16:58 PM GMT > Subject: [PATCH RFC 0/6] mm/kdump: allow to exclude pages that are logically > offline > > > Right now, pages inflated as part of a balloon driver will be dumped > by dump tools like makedumpfile. While XEN is able to check in t

Re: [Xen-devel] [PATCH RFC 0/6] mm/kdump: allow to exclude pages that are logically offline

2018-11-14 Thread Nadav Amit
From: David Hildenbrand Sent: November 14, 2018 at 11:05:38 PM GMT > Subject: Re: [PATCH RFC 0/6] mm/kdump: allow to exclude pages that are > logically offline > > > On 14.11.18 23:57, Nadav Amit wrote: >> From: David Hildenbrand >> Sent: November 14, 2018 at 9:16:58

Re: [Xen-devel] [PATCH v1 6/8] vmw_balloon: mark inflated pages PG_offline

2018-11-20 Thread Nadav Amit
Thanks for this patch! > On Nov 19, 2018, at 2:16 AM, David Hildenbrand wrote: > > Mark inflated and never onlined pages PG_offline, to tell the world that > the content is stale and should not be dumped. > > Cc: Xavier Deguillard > Cc: Nadav Amit > Cc: Arnd Be

[Xen-devel] [PATCH v4 4/9] x86/mm/tlb: Flush remote and local TLBs concurrently

2019-08-23 Thread Nadav Amit
.org Cc: k...@vger.kernel.org Cc: xen-devel@lists.xenproject.org Reviewed-by: Michael Kelley # Hyper-v parts Reviewed-by: Juergen Gross # Xen and paravirt parts Reviewed-by: Dave Hansen Signed-off-by: Nadav Amit --- arch/x86/hyperv/mmu.c | 10 +++--- arch/x86/include/asm/paravirt.h

[Xen-devel] [PATCH v4 0/9] x86/tlb: Concurrent TLB flushes

2019-08-23 Thread Nadav Amit
ualizat...@lists.linux-foundation.org Cc: x...@kernel.org Cc: xen-devel@lists.xenproject.org Nadav Amit (9): smp: Run functions concurrently in smp_call_function_many() x86/mm/tlb: Unify flush_tlb_func_local() and flush_tlb_func_remote() x86/mm/tlb: Open-code on_each_cpu_cond_mask() for tlb_is_not_lazy

[Xen-devel] [RFC PATCH v2 1/3] x86/mm/tlb: Change __flush_tlb_one_user interface

2019-08-23 Thread Nadav Amit
Ostrovsky Cc: Juergen Gross Cc: Stefano Stabellini Cc: xen-devel@lists.xenproject.org Signed-off-by: Nadav Amit --- arch/x86/include/asm/paravirt.h | 5 ++-- arch/x86/include/asm/paravirt_types.h | 3 ++- arch/x86/include/asm/tlbflush.h | 24 + arch/x86/kernel

Re: [Xen-devel] [RFC PATCH v2 1/3] x86/mm/tlb: Change __flush_tlb_one_user interface

2019-08-26 Thread Nadav Amit
> On Aug 26, 2019, at 12:51 AM, Juergen Gross wrote: > > On 24.08.19 00:52, Nadav Amit wrote: >> __flush_tlb_one_user() currently flushes a single entry, and flushes it >> both in the kernel and user page-tables, when PTI is enabled. >> Change __flush_tlb_one_user()

Re: [Xen-devel] xen: Can't insert balloon page into VM userspace (WAS Re: [linux-linus bisection] complete test-arm64-arm64-xl-xsm)

2019-03-12 Thread Nadav Amit
> On Mar 12, 2019, at 10:23 AM, David Hildenbrand wrote: > > On 12.03.19 18:14, Matthew Wilcox wrote: >> On Tue, Mar 12, 2019 at 05:05:39PM +, Julien Grall wrote: >>> On 3/12/19 3:59 PM, Julien Grall wrote: It looks like all the arm test for linus [1] and next [2] tree are now faili

[Xen-devel] [RFC PATCH 5/6] x86/mm/tlb: Flush remote and local TLBs concurrently

2019-05-25 Thread Nadav Amit
org Signed-off-by: Nadav Amit --- arch/x86/hyperv/mmu.c | 2 + arch/x86/include/asm/paravirt.h | 8 +++ arch/x86/include/asm/paravirt_types.h | 6 ++ arch/x86/include/asm/tlbflush.h | 6 ++ arch/x86/kernel/kvm.c | 1 + arch/x86/kernel/paravirt.c

Re: [Xen-devel] [RFC PATCH 5/6] x86/mm/tlb: Flush remote and local TLBs concurrently

2019-05-25 Thread Nadav Amit
> On May 25, 2019, at 1:22 AM, Nadav Amit wrote: > > To improve TLB shootdown performance, flush the remote and local TLBs > concurrently. Introduce flush_tlb_multi() that does so. The current > flush_tlb_others() interface is kept, since paravirtual interfaces need > to be ad

Re: [Xen-devel] [RFC PATCH 5/6] x86/mm/tlb: Flush remote and local TLBs concurrently

2019-05-27 Thread Nadav Amit
> On May 27, 2019, at 2:47 AM, Peter Zijlstra wrote: > > On Sat, May 25, 2019 at 10:54:50AM +0200, Juergen Gross wrote: >> On 25/05/2019 10:22, Nadav Amit wrote: > >>> diff --git a/arch/x86/include/asm/paravirt_types.h >>> b/arch/x86/include/asm/par

[Xen-devel] [RFC PATCH v2 04/12] x86/mm/tlb: Flush remote and local TLBs concurrently

2019-05-30 Thread Nadav Amit
org Signed-off-by: Nadav Amit --- arch/x86/hyperv/mmu.c | 2 + arch/x86/include/asm/paravirt.h | 8 +++ arch/x86/include/asm/paravirt_types.h | 6 ++ arch/x86/include/asm/tlbflush.h | 6 ++ arch/x86/kernel/kvm.c | 1 + arch/x86/kernel/paravirt.c

Re: [Xen-devel] [RFC PATCH v2 04/12] x86/mm/tlb: Flush remote and local TLBs concurrently

2019-05-31 Thread Nadav Amit
> On May 31, 2019, at 4:48 AM, Juergen Gross wrote: > > On 31/05/2019 08:36, Nadav Amit wrote: >> >> --- a/arch/x86/include/asm/paravirt_types.h >> +++ b/arch/x86/include/asm/paravirt_types.h >> @@ -211,6 +211,12 @@ struct pv_mmu_ops { >> voi

[Xen-devel] [PATCH 4/9] x86/mm/tlb: Flush remote and local TLBs concurrently

2019-06-12 Thread Nadav Amit
org Signed-off-by: Nadav Amit --- arch/x86/hyperv/mmu.c | 2 + arch/x86/include/asm/paravirt.h | 8 +++ arch/x86/include/asm/paravirt_types.h | 6 +++ arch/x86/include/asm/tlbflush.h | 6 +++ arch/x86/kernel/kvm.c | 1 + arch/x86/kernel/

Re: [Xen-devel] [PATCH 4/9] x86/mm/tlb: Flush remote and local TLBs concurrently

2019-06-25 Thread Nadav Amit
> On Jun 25, 2019, at 2:29 PM, Dave Hansen wrote: > > On 6/12/19 11:48 PM, Nadav Amit wrote: >> To improve TLB shootdown performance, flush the remote and local TLBs >> concurrently. Introduce flush_tlb_multi() that does so. The current >> flush_tlb_others() interface

Re: [Xen-devel] [PATCH 4/9] x86/mm/tlb: Flush remote and local TLBs concurrently

2019-06-25 Thread Nadav Amit
> On Jun 25, 2019, at 8:00 PM, Dave Hansen wrote: > > On 6/25/19 7:35 PM, Nadav Amit wrote: >>>> const struct flush_tlb_info *f = info; >>>> + enum tlb_flush_reason reason; >>>> + >>>> + reason = (f->mm == NULL) ? TLB_LOCAL_SHOOTDO

Re: [Xen-devel] [PATCH 4/9] x86/mm/tlb: Flush remote and local TLBs concurrently

2019-06-25 Thread Nadav Amit
> On Jun 25, 2019, at 8:36 PM, Andy Lutomirski wrote: > > On Wed, Jun 12, 2019 at 11:49 PM Nadav Amit wrote: >> To improve TLB shootdown performance, flush the remote and local TLBs >> concurrently. Introduce flush_tlb_multi() that does so. The current >> flush_tlb

[Xen-devel] [PATCH v2 0/9] x86: Concurrent TLB flushes

2019-07-03 Thread Nadav Amit
el.org Cc: linux-ker...@vger.kernel.org Cc: virtualizat...@lists.linux-foundation.org Cc: x...@kernel.org Cc: xen-devel@lists.xenproject.org Nadav Amit (9): smp: Run functions concurrently in smp_call_function_many() x86/mm/tlb: Remove reason as argument for flush_tlb_func_local() x86/m

[Xen-devel] [PATCH v2 4/9] x86/mm/tlb: Flush remote and local TLBs concurrently

2019-07-03 Thread Nadav Amit
ists.linux-foundation.org Cc: k...@vger.kernel.org Cc: xen-devel@lists.xenproject.org Signed-off-by: Nadav Amit --- arch/x86/hyperv/mmu.c | 13 +++--- arch/x86/include/asm/paravirt.h | 6 +-- arch/x86/include/asm/paravirt_types.h | 4 +- arch/x86/include/asm/tlbflush.h | 9

Re: [Xen-devel] [PATCH v2 4/9] x86/mm/tlb: Flush remote and local TLBs concurrently

2019-07-03 Thread Nadav Amit
> On Jul 3, 2019, at 7:04 AM, Juergen Gross wrote: > > On 03.07.19 01:51, 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_t

Re: [Xen-devel] [PATCH v2 4/9] x86/mm/tlb: Flush remote and local TLBs concurrently

2019-07-03 Thread Nadav Amit
> On Jul 3, 2019, at 10:43 AM, Andrew Cooper wrote: > > On 03/07/2019 18:02, Nadav Amit wrote: >>> On Jul 3, 2019, at 7:04 AM, Juergen Gross wrote: >>> >>> On 03.07.19 01:51, Nadav Amit wrote: >>>> To improve TLB shootdown performance, f

[Xen-devel] [PATCH v3 4/9] x86/mm/tlb: Flush remote and local TLBs concurrently

2019-07-18 Thread Nadav Amit
ists.linux-foundation.org Cc: k...@vger.kernel.org Cc: xen-devel@lists.xenproject.org Signed-off-by: Nadav Amit --- 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

[Xen-devel] [PATCH v3 0/9] x86: Concurrent TLB flushes

2019-07-18 Thread Nadav Amit
izat...@lists.linux-foundation.org Cc: x...@kernel.org Cc: xen-devel@lists.xenproject.org Nadav Amit (9): smp: Run functions concurrently in smp_call_function_many() x86/mm/tlb: Remove reason as argument for flush_tlb_func_local() x86/mm/tlb: Open-code on_each_cpu_cond_mask() for tlb_is_not_lazy() x86/m

Re: [Xen-devel] [PATCH v3 4/9] x86/mm/tlb: Flush remote and local TLBs concurrently

2019-07-22 Thread Nadav Amit
> On Jul 22, 2019, at 12:14 PM, Peter Zijlstra wrote: > > On Thu, Jul 18, 2019 at 05:58:32PM -0700, Nadav Amit wrote: >> @@ -709,8 +716,9 @@ void native_flush_tlb_others(const struct cpumask >> *cpumask, >> * doing a speculative memory access. >>

Re: [RFC PATCH 00/30] Code tagging framework and applications

2022-09-05 Thread Nadav Amit
On Aug 31, 2022, at 3:19 AM, Mel Gorman wrote: > On Wed, Aug 31, 2022 at 04:42:30AM -0400, Kent Overstreet wrote: >> On Wed, Aug 31, 2022 at 09:38:27AM +0200, Peter Zijlstra wrote: >>> On Tue, Aug 30, 2022 at 02:48:49PM -0700, Suren Baghdasaryan wrote: === Code t

Re: [PATCH v2] x86/PCI: Prefer MMIO over PIO on all hypervisor

2022-10-03 Thread Nadav Amit
On Oct 3, 2022, at 8:03 AM, Vitaly Kuznetsov wrote: > Not my but rather PCI maintainer's call but IMHO dropping 'const' is > better, introducing a new global var is our 'last resort' and should be > avoided whenever possible. Alternatively, you can add a > raw_pci_ext_ops_preferred() function che

Re: [PATCH v2] x86/PCI: Prefer MMIO over PIO on all hypervisor

2022-10-03 Thread Nadav Amit
On Oct 3, 2022, at 2:06 PM, H. Peter Anvin wrote: > ⚠ External Email > > On October 3, 2022 10:34:15 AM PDT, Nadav Amit wrote: >> On Oct 3, 2022, at 8:03 AM, Vitaly Kuznetsov wrote: >> >>> Not my but rather PCI maintainer's call but IMHO dropping '

Re: [PATCH v2] x86/PCI: Prefer MMIO over PIO on all hypervisor

2022-10-03 Thread Nadav Amit
On Oct 3, 2022, at 4:51 PM, H. Peter Anvin wrote: > ⚠ External Email > > On October 3, 2022 2:28:40 PM PDT, Nadav Amit wrote: >> On Oct 3, 2022, at 2:06 PM, H. Peter Anvin wrote: >> >>> ⚠ External Email >>> >>> On October 3, 2022 10:34:15 AM P

Re: [PATCH v2] x86/PCI: Prefer MMIO over PIO on all hypervisor

2022-10-04 Thread Nadav Amit
On Oct 4, 2022, at 1:22 AM, Alexander Graf wrote: > ⚠ External Email > > Hey Nadav, > > On 03.10.22 19:34, Nadav Amit wrote: >> On Oct 3, 2022, at 8:03 AM, Vitaly Kuznetsov wrote: >> >>> Not my but rather PCI maintainer's call but IMHO dropping '

Re: [PATCH v2] x86/PCI: Prefer MMIO over PIO on all hypervisor

2022-10-10 Thread Nadav Amit
On Oct 4, 2022, at 11:48 AM, Nadav Amit wrote: > On Oct 4, 2022, at 1:22 AM, Alexander Graf wrote: > >> ⚠ External Email >> >> Hey Nadav, >> >> On 03.10.22 19:34, Nadav Amit wrote: >>> On Oct 3, 2022, at 8:03 AM, Vitaly Kuznetsov wrote: >>