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] Avoid panic when adjusting sedf parameters

To: Jan Beulich <JBeulich@xxxxxxxx>, Juergen Gross <juergen.gross@xxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] Avoid panic when adjusting sedf parameters
From: Keir Fraser <keir.xen@xxxxxxxxx>
Date: Thu, 17 Nov 2011 13:48:36 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 17 Nov 2011 05:49:53 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; 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; bh=8kMyfhIdiwsMLnsU976399ulaqPJYctpklxYz6riMCw=; b=PDCrGUXMOsTsHgwyQfKglpGh8hBkmVtW7Ei2MiNK7MqPowmmKMG9UR1CHMESsZaNJi ZvIeZsjKr2d4cfnmPb5+Fp4V1i8bzscuC1gLKpcdJiOsDqiPuHsj4bTjMDd6cr8EijZh WSPJXz3dBmJ032hSJx6mjITiE9k3mulbzWgCM=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4EC51A8D0200007800061933@xxxxxxxxxxxxxxxxxxxx>
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: AcylL5pw1Hce9pn+5kyrK6KRIMP8Vg==
Thread-topic: [Xen-devel] [PATCH] Avoid panic when adjusting sedf parameters
User-agent: Microsoft-Entourage/12.31.0.110725
On 17/11/2011 13:30, "Jan Beulich" <JBeulich@xxxxxxxx> wrote:

>> +#define for_each_domain_in_cpupool(_d,_c)       \
>> + for ( (_d) = rcu_dereference(domain_list);     \
>> +       (_d) != NULL;                            \
>> +       (_d) = rcu_dereference((_d)->next_in_list )) \
> 
> Wouldn't this, up to here, simply be for_each_domain()?
> 
>> +       if ((_d)->cpupool == (_c))
> 
> This is dangerous - consider code like

I also wonder (and this is true for the existing open-coded versions too)
whether we have sufficient locking around use of d->cpupool? Do these loops
hold enough locks to ensure that d->cpupool doesn't change under their feet?

 -- Keir



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