From mboxrd@z Thu Jan 1 00:00:00 1970 From: Radim =?utf-8?B?S3LEjW3DocWZ?= Subject: Re: [PATCH 1/9] KVM: add kvm_arch_sched_in Date: Wed, 20 Aug 2014 14:56:57 +0200 Message-ID: <20140820125656.GE28873@potion.brq.redhat.com> References: <1408480536-8240-1-git-send-email-rkrcmar@redhat.com> <1408480536-8240-2-git-send-email-rkrcmar@redhat.com> <53F4529A.5060806@de.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Paolo Bonzini , Gleb Natapov , Raghavendra KT , Vinod Chegu , Hui-Zhi To: Christian Borntraeger Return-path: Content-Disposition: inline In-Reply-To: <53F4529A.5060806@de.ibm.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org 2014-08-20 09:47+0200, Christian Borntraeger: > On 19/08/14 22:35, Radim Kr=C4=8Dm=C3=A1=C5=99 wrote: >=20 > > --- a/virt/kvm/kvm_main.c > > +++ b/virt/kvm/kvm_main.c > > @@ -3123,6 +3123,8 @@ static void kvm_sched_in(struct preempt_notif= ier *pn, int cpu) > > if (vcpu->preempted) > > vcpu->preempted =3D false; > >=20 > > + kvm_arch_sched_in(vcpu, cpu); > > + > > kvm_arch_vcpu_load(vcpu, cpu); > > } > >=20 >=20 > Why cant you reuse kvm_arch_vcpu_load? Its also called on each sched_= in and is architecture specific. kvm_arch_vcpu_load is also called from kvm_vcpu_ioctl, so we'd be shrinking unnecessarily. (sched_in gives us a bit of useful information about the state of the system, kvm_vcpu_ioctl not that much.)