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] cpupools and locking

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] cpupools and locking
From: Juergen Gross <juergen.gross@xxxxxxxxxxxxxx>
Date: Wed, 05 May 2010 13:07:02 +0200
Cc: George Dunlap <George.Dunlap@xxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 05 May 2010 04:08:01 -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=1273057798; x=1304593798; h=message-id:date:from:mime-version:to:cc:subject: references:in-reply-to; z=Message-ID:=20<4BE15156.5030308@xxxxxxxxxxxxxx>|Date:=20 Wed,=2005=20May=202010=2013:07:02=20+0200|From:=20Juergen =20Gross=20<juergen.gross@xxxxxxxxxxxxxx>|MIME-Version: =201.0|To:=20Keir=20Fraser=20<keir.fraser@xxxxxxxxxxxxx> |CC:=20George=20Dunlap=20<George.Dunlap@xxxxxxxxxxxxx>, =20=0D=0A=20"xen-devel@xxxxxxxxxxxxxxxxxxx"=20<xen-devel@ lists.xensource.com>|Subject:=20Re:=20[Xen-devel]=20cpupo ols=20and=20locking|References:=20<C806F230.13552%keir.fr aser@xxxxxxxxxxxxx>|In-Reply-To:=20<C806F230.13552%keir.f raser@xxxxxxxxxxxxx>; bh=MAWI6G9Sdhw9Be2CVIfNnKBtxU1/w+NGnC/bV0tte5E=; b=C73BYGZYpfWmkmT2kRDlyw2AkUpE0f6Qx92MwbSiF9i5hX3U5AeHK6GT rnzpJa67gkz/4kTjT07c2GuPOwKUJVX6lyphXMiorZhtGdS9qczWhtOOS +eSIg5BLPGJDdGfWUoLjN03RCvpvN1NtK3P2B2ef577giE4Txk8e7uuPB igj7gaLKzAia20ld/NF+uU4BsKMP4y6myF9015y3/B15++NaSCtBUWTZZ H/lodeLUnD0jF6OzgWsuDUeCWM4Tk;
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; b=M5kD4JUYaDFg9XtvGyL0Hal+Rsw4L20nco3e86rDkzFA18wLO+Psdo3U U/waIHyUjwjzWvgvmmhYEaA1oxFIythaCMMAUnrRimXpy46dF1VVvkdVH I/g2T3jp6ZshhcauYcZ1VOCBIuprzGghEh9ZJOGuvYd7fzrr+YSgD1xiA YvndACFQ4EjgXDba9B97eu7QN8/fn4xy1m5bFR3zFDjorEnTuMaDnfibp 3kY/wfHUF0ImTjmRjkISSUlqj421C;
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C806F230.13552%keir.fraser@xxxxxxxxxxxxx>
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: <C806F230.13552%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100411 Iceowl/1.0b1 Icedove/3.0.4
On 05/05/2010 11:00 AM, Keir Fraser wrote:
On 05/05/2010 06:25, "Juergen Gross"<juergen.gross@xxxxxxxxxxxxxx>  wrote:

cpupool_do_domctl is called always while the domctl lock is being held. Maybe
I should have added a comment to document this assumption.

Yes please. Even better would be to explicitly add your own big lock in
cpupool.c, just for clarity. And why do you need your 'little' lock around
the lookup operations at all, in that case? It seems unnecessary if you have
a bigger lock protecting you; yet insufficient if you do not.

That's the best solution, I think. Patch attached.


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

Attachment: poollock.patch
Description: Text Data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>