From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] qemu-kvm: response to SIGUSR1 to start/stop a VCPU (v2) Date: Thu, 02 Dec 2010 11:07:54 +0200 Message-ID: <4CF761EA.6050200@redhat.com> References: <1290530963-3448-1-git-send-email-aliguori@us.ibm.com> <4CECCA39.4060702@redhat.com> <4CED1A23.9030607@linux.vnet.ibm.com> <4CED1FD3.1000801@redhat.com> <20101201123742.GA3780@linux.vnet.ibm.com> <4CF6460C.5070604@redhat.com> <20101201161221.GA8073@linux.vnet.ibm.com> <1291220718.32004.1696.camel@laptop> <20101201171758.GA8514@sequoia.sous-sol.org> <1291224176.32004.1763.camel@laptop> <4CF6854C.4020500@redhat.com> <1291230476.32004.1922.camel@laptop> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Rik van Riel , Chris Wright , vatsa@linux.vnet.ibm.com, Anthony Liguori , qemu-devel@nongnu.org, kvm@vger.kernel.org, Ingo Molnar , Mike Galbraith To: Peter Zijlstra Return-path: Received: from mx1.redhat.com ([209.132.183.28]:13751 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751262Ab0LBJIb (ORCPT ); Thu, 2 Dec 2010 04:08:31 -0500 In-Reply-To: <1291230476.32004.1922.camel@laptop> Sender: kvm-owner@vger.kernel.org List-ID: On 12/01/2010 09:07 PM, Peter Zijlstra wrote: > > > > The pause loop exiting& directed yield patches I am working on > > preserve inter-vcpu fairness by round robining among the vcpus > > inside one KVM guest. > > I don't necessarily think that's enough. > > Suppose you've got 4 vcpus, one is holding a lock and 3 are spinning. > They'll end up all three donating some time to the 4th. > > The only way to make that fair again is if due to future contention the > 4th cpu donates an equal amount of time back to the resp. cpus it got > time from. Guest lock patterns and host scheduling don't provide this > guarantee. > That is fine. Fairness is pointless if it there's no work to be done for the other three threads. Just like if you have four processes, one of which if processing, the others sleeping, cpu is not divided equally. -- error compiling committee.c: too many arguments to function