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] [RFO] #2: removing a concurrency bottleneck

To: "Dan Magenheimer" <dan.magenheimer@xxxxxxxxxx>
Subject: Re: [Xen-devel] [RFO] #2: removing a concurrency bottleneck
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Fri, 20 Mar 2009 08:30:22 +0000
Cc: "Xen-Devel \(E-mail\)" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 20 Mar 2009 01:36:03 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <9dff6961-7b13-4447-af9c-f51deef21882@default>
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>
References: <9dff6961-7b13-4447-af9c-f51deef21882@default>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>>> Dan Magenheimer <dan.magenheimer@xxxxxxxxxx> 19.03.09 18:52 >>>
>In per-cpu, I would allocate at system initialization one
>pair of buffers for each cpu (question: num_present_cpus,
>num_online_cpus, or num_possible_cpus?).  Then no lock
>is required.

It should certainly be num_possible_cpus(), which (hopefully) is identical to
num_present_cpus() until physical CPU hotplug gets supported, in which
case some infrastructure will need to be added anyway so that your and
other code could do such per-CPU allocations on demand.

Other than Keir suggested, I'd not recommend adding further NR_CPUS
sized arrays (based mostly on how long it took to mostly (fully?) get rid of
them in Linux in order to support huge systems) - just use per-CPU pointers
to dynamically allocated memory.

Jan


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

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