This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


Re: [Xen-devel] [Patch] remove unneeded test for cpu in cpupool

To: Juergen Gross <juergen.gross@xxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [Patch] remove unneeded test for cpu in cpupool
From: Keir Fraser <keir.xen@xxxxxxxxx>
Date: Wed, 16 Mar 2011 11:14:27 +0000
Cc: "Przywara, Andre" <Andre.Przywara@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 16 Mar 2011 04:15:26 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:user-agent:date:subject:from:to:cc:message-id :thread-topic:thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; bh=y9p528eSWZ2CGviyP0UugZU6WErNsXOvZ1aFOw6JoM4=; b=HuknIcfOWd0Ff2jy+/xCaahKhZexhaJj+APg5EeOvd/D9wSnbOzLXIDyZq927FESq6 p7VKsVA7O532H5U2AKGSwnbSrpOJJKSKAFySDor42IJGI5m73Qu+1kGxXYzpAjw+twKT 5devhiToTv9E4Fwbg0dnaL5DWRZKLp4M0Gu7U=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=user-agent:date:subject:from:to:cc:message-id:thread-topic :thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; b=lG9Um70gdiT37yOksH8RTc5V/0kL+tYmLexjAeZHs1Fa/Ujd9U/pY1f6U7CObfNcPK LEW5yYgOddi+lQFi+T5idPhhPpKuY7cy0jD15Mk4/ISxFcXYpWAzB/v1uXrnadN1Bb2/ nw9X1KvbNjehTJUzl1dNPSLib9B1Rwr/eKsNk=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4D8092BB.4030006@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acvjy0/8D0oD7et1uUO/erKTrchfMw==
Thread-topic: [Xen-devel] [Patch] remove unneeded test for cpu in cpupool
User-agent: Microsoft-Entourage/
On 16/03/2011 10:36, "Juergen Gross" <juergen.gross@xxxxxxxxxxxxxx> wrote:

> On 03/16/11 11:13, Keir Fraser wrote:
>> On 16/03/2011 06:34, "Juergen Gross"<juergen.gross@xxxxxxxxxxxxxx>  wrote:
>>> Hi,
>>> attached patch removes an unneeded check in vcpu_migrate().
>>> Andre, could you please give it a try on your 48 core machine with
>>> xl cpupool-numa-split
>>> I'd like to make sure the check is really not needed. On my machines it
>>> worked
>>> okay, but your machine seems to trigger races more easily.
>> Could you BUG_ON failing this test when we exit the retry loop? It seems a
>> suitable loop post-condition.
> Not easily. The cpu_valid mask of a cpupool might change between the call of
> pick_cpu and the test. In the normal case this is okay, as removing a cpu
> from a cpupool (which is the critical case) will call cpu_disable_scheduler()
> after removing the cpu from the mask, which will migrate the vcpu away.
> Using a saved copy of cpu_valid for the test isn't working either, if a cpu
> is added to and removed from the cpupool in a very short time. I would have
> to use a generation count for the cpu_valid mask and do the check only if
> the count didn't change. I think this is little bit of overkill here, but if
> you'd prefer it, I can do a patch.

Ah no, if it's more subtle than it appears, and it's not a straighjtforward
post-condition, then I wouldn't bother.

 -- Keir

> Juergen

Xen-devel mailing list

<Prev in Thread] Current Thread [Next in Thread>