From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754095AbbDQKzW (ORCPT ); Fri, 17 Apr 2015 06:55:22 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:50117 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752002AbbDQKzT (ORCPT ); Fri, 17 Apr 2015 06:55:19 -0400 Date: Fri, 17 Apr 2015 12:55:06 +0200 From: Peter Zijlstra To: Paolo Bonzini Cc: torvalds@linux-foundation.org, linux-kernel@vger.kernel.org, gleb@kernel.org, kvm@vger.kernel.org, Ralf Baechle , mtosatti@redhat.com, luto@kernel.org Subject: Re: [GIT PULL] First batch of KVM changes for 4.1 Message-ID: <20150417105506.GF5029@twins.programming.kicks-ass.net> References: <1428678089-16291-1-git-send-email-pbonzini@redhat.com> <20150417085238.GJ17717@twins.programming.kicks-ass.net> <20150417091745.GA24151@twins.programming.kicks-ass.net> <5530DBED.5080508@redhat.com> <20150417103654.GE5029@twins.programming.kicks-ass.net> <5530E28F.2030401@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5530E28F.2030401@redhat.com> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 17, 2015 at 12:38:07PM +0200, Paolo Bonzini wrote: > > > On 17/04/2015 12:36, Peter Zijlstra wrote: > > Now you make everybody pay for your crap, x86-64 paravirt or not. Keep > > the cost by those who need it. > > > > Please take it out, ASAP. > > I'll just implement the static key. Can you first show that: preempt_out: int cpu = smp_processor_id(); if (vcpu->cpu != cpu) vcpu->cpu = cpu; preempt_in: int cpu = smp_processor_id(); if (unlikely(vcpu->cpu != cpu)) do_vcpu_migration_callback(cpu); Is actually a measurable performance hit and we actually _need_ the migration callback? Also, it looks like you already do exactly this for other things, look at: kvm_sched_in() kvm_arch_vcpu_load() if (unlikely(vcpu->cpu != cpu) ... ) So no, I don't believe for one second you need this.