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

To: Juergen Gross <juergen.gross@xxxxxxxxxxxxxx>, George Dunlap <George.Dunlap@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] cpupools and locking
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Wed, 5 May 2010 10:00:16 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 05 May 2010 02:01:15 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4BE1015F.8050901@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: AcrsE3EQbxQvokq9QLesEidurGZrwQAHfAKg
Thread-topic: [Xen-devel] cpupools and locking
User-agent: Microsoft-Entourage/
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.

> Keir's patch to move the cpupool commands to the sysctl interface makes a
> change of the locking mandatory. I'll setup a patch for this.

Well, there is a big sysctl_lock too, so your cpupool commands will still be
serialised. If you require serialisation against *other* domctl operations
then yes, you now have an issue. You could just grab the domctl lock of
course (no current ordering constraints on the two locks, and there is an
API for acquiring/releasing the domctl lock).

 -- Keir

Xen-devel mailing list

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