[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190527123206.GC2623@hirez.programming.kicks-ass.net>
Date: Mon, 27 May 2019 14:32:06 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Paolo Bonzini <pbonzini@...hat.com>
Cc: Juergen Gross <jgross@...e.com>, Nadav Amit <namit@...are.com>,
Ingo Molnar <mingo@...hat.com>,
Andy Lutomirski <luto@...nel.org>,
Borislav Petkov <bp@...en8.de>, linux-kernel@...r.kernel.org,
"K. Y. Srinivasan" <kys@...rosoft.com>,
Haiyang Zhang <haiyangz@...rosoft.com>,
Stephen Hemminger <sthemmin@...rosoft.com>,
Sasha Levin <sashal@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>, x86@...nel.org,
Dave Hansen <dave.hansen@...ux.intel.com>,
Boris Ostrovsky <boris.ostrovsky@...cle.com>,
linux-hyperv@...r.kernel.org,
virtualization@...ts.linux-foundation.org, kvm@...r.kernel.org,
xen-devel@...ts.xenproject.org
Subject: Re: [RFC PATCH 5/6] x86/mm/tlb: Flush remote and local TLBs
concurrently
On Mon, May 27, 2019 at 12:21:59PM +0200, Paolo Bonzini wrote:
> On 27/05/19 11:47, Peter Zijlstra wrote:
> > --- a/arch/x86/kernel/kvm.c
> > +++ b/arch/x86/kernel/kvm.c
> > @@ -580,7 +580,7 @@ static void __init kvm_apf_trap_init(voi
> >
> > static DEFINE_PER_CPU(cpumask_var_t, __pv_tlb_mask);
> >
> > -static void kvm_flush_tlb_others(const struct cpumask *cpumask,
> > +static void kvm_flush_tlb_multi(const struct cpumask *cpumask,
> > const struct flush_tlb_info *info)
> > {
> > u8 state;
> > @@ -594,6 +594,9 @@ static void kvm_flush_tlb_others(const s
> > * queue flush_on_enter for pre-empted vCPUs
> > */
> > for_each_cpu(cpu, flushmask) {
> > + if (cpu == smp_processor_id())
> > + continue;
> > +
>
> Even this would be just an optimization; the vCPU you're running on
> cannot be preempted. You can just change others to multi.
Yeah, I know, but it felt weird so I added the explicit skip. No strong
feelings though.
Powered by blists - more mailing lists