[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] Avoid panic when adjusting sedf parameters


  • To: Keir Fraser <keir.xen@xxxxxxxxx>
  • From: Juergen Gross <juergen.gross@xxxxxxxxxxxxxx>
  • Date: Thu, 17 Nov 2011 15:02:46 +0100
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, Jan Beulich <JBeulich@xxxxxxxx>
  • Delivery-date: Thu, 17 Nov 2011 14:06:58 +0000
  • 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=hWvfzQXc7Ty8MYpdBFr3ZM1FaVCuN8E2zRMJT5S/JRxMfdxLRWkMkSih Jtx5lfoGwQ5qRmYXJz3Q1zS1O+v8jkK2MUv+UGEyIxjVExZ3mWPROAMbJ kpVJyhBPDYx7L3LPoHltOH09C1q+bWAEpY5Sgx+I8REGeRc7iSsXkd5jT vCpJQ/qPmKkpii/tXWEW/40GO7axGAfGhNp7OoOvb/qqrNseGI3jsKhiz WtD83GcawQ9Y8EizPp9H2CxsBhswY;
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

On 11/17/2011 02:48 PM, Keir Fraser wrote:
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?

d->cpupool is changed in three functions:

I was just preparing a patch for cpupool_unassign_cpu() which is lacking
rcu_lock_domain().
cpupool_add_domain() is called only for domains not yet in the domain list.
sched_move_domain() is only called with domain lock held.


Juergen

--
Juergen Gross                 Principal Developer Operating Systems
PDG 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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.