From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 1/3v2] kvm-s390: Implement the directed yield (diag 9c) hypervisor call for KVM Date: Tue, 24 Apr 2012 19:15:46 +0300 Message-ID: <4F96D1B2.7040901@redhat.com> References: <4F96A021.4000704@de.ibm.com> <1335272114-64505-1-git-send-email-borntraeger@de.ibm.com> <4F96A55E.1050703@redhat.com> <4F96CB16.8060700@de.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Marcelo Tossati , Carsten Otte , Alexander Graf , Jens Freimann , Cornelia Huck , Heiko Carstens , Martin Schwidefsky , Heinz Graalfs , KVM , Konstantin Weitz To: Christian Borntraeger Return-path: Received: from mx1.redhat.com ([209.132.183.28]:42555 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755948Ab2DXQQJ (ORCPT ); Tue, 24 Apr 2012 12:16:09 -0400 In-Reply-To: <4F96CB16.8060700@de.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: On 04/24/2012 06:47 PM, Christian Borntraeger wrote: > > I think the code will me more readable, and less obvious that is was > > copied from kvm_vcpu_on_spin(), if you put all the processing outside > > the loop, except for matching the vpu itself. > > > > So the code reads > > > > find a vcpu > > obtain the task > > do the yield > > > > instead of looking like you're doing the processing for every vcpu. The > > loop is just a slow lookup which might some day be replaced by a table > > lookup. > > Ok. We might also have a kvm_vcpu_on_spin_directed in common code, > Would you prefer that? You mean a function that takes a vcpu and tries to yield_to() it? Or something else? -- error compiling committee.c: too many arguments to function