From: Keir Fraser Subject: Re: cpupools and locking Date: Wed, 5 May 2010 10:00:16 +0100 Message-ID: References: <4BE1015F.8050901@ts.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4BE1015F.8050901@ts.fujitsu.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Juergen Gross , George Dunlap Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On 05/05/2010 06:25, "Juergen Gross" 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