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

Re: [Xen-devel] [RFO] #2: removing a concurrency bottleneck



>>> 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


 


Rackspace

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