WARNING - OLD ARCHIVES

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/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: Keir Fraser <keir.xen@xxxxxxxxx>
Subject: Re: [Xen-devel] [Patch] remove unneeded test for cpu in cpupool
From: Juergen Gross <juergen.gross@xxxxxxxxxxxxxx>
Date: Wed, 16 Mar 2011 11:36:43 +0100
Cc: "Przywara, Andre" <Andre.Przywara@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 16 Mar 2011 03:37:26 -0700
Dkim-signature: v=1; a=rsa-sha256; c=simple/simple; d=ts.fujitsu.com; i=juergen.gross@xxxxxxxxxxxxxx; q=dns/txt; s=s1536b; t=1300271806; x=1331807806; h=message-id:date:from:mime-version:to:cc:subject: references:in-reply-to:content-transfer-encoding; bh=EgwSgJsJ6gSpnlXTdt9AdzkELaMacZAPKAegCQoaPCg=; b=awJLCbUpMN9KLTejJgeK8e+pwIUaP0NVI+QTgai+HmuUXBWi+s1eM+P4 7WnrPaACCI+NSmztauS/ohPWh1wYhxKrhNRgmuOjmOWZ4D2L6in0wh8RN 0WiqzMW7Bm98voyGVW78oyDGyMIzk3RQ3qzTiC6TPn6MgntuaXt8USOOh VpEc6bNwtuUo26HZIHxZ9bV1Ye4icDtKXOxUAicD00QNhI67TtMx+JbQw tbn3lOXMznmrgMk6JwQn+ulwt55Y0;
Domainkey-signature: s=s1536a; d=ts.fujitsu.com; c=nofws; q=dns; h=X-SBRSScore:X-IronPort-AV:Received:X-IronPort-AV: Received:Received:Message-ID:Date:From:Organization: User-Agent:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=fwgGn9r/jCY+bJNOG1XaVoAIBOjAEuE9BOoquoD/RJUNjGa6dSWQb/if a2fwI0uJbmnmyJLlSOmxNSjKBRZqi65ni1aB5Ba9XK/N+6mAFSFn/F8UO sjkTDr5Dtmjm5zV3xQjHsJhp4/4DG95RfyTOLmYkx8AWIbEDAucULcAr0 qYVWGk9DPJhBNVKNqZsf8K4riuHDja+1JYyF0iU7Sje2TexBWi5MbsBU+ pCRU8XjdxgcFEsYf5lqULBpyM0FW2;
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C9A63DD6.14E2D%keir.xen@xxxxxxxxx>
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>
Organization: Fujitsu Technology Solutions
References: <C9A63DD6.14E2D%keir.xen@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20101226 Iceowl/1.0b1 Icedove/3.0.11
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.


Juergen

--
Juergen Gross                 Principal Developer Operating Systems
TSP ES&S SWE OS6                       Telephone: +49 (0) 89 3222 2967
Fujitsu Technology Solutions              e-mail: juergen.gross@xxxxxxxxxxxxxx
Domagkstr. 28                           Internet: ts.fujitsu.com
D-80807 Muenchen                 Company details: ts.fujitsu.com/imprint.html

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

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