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

Re: [Xen-devel] [PATCH v6 3/7] x86: initialize per socket cpu map



>>> On 05.12.13 at 10:38, Dongxiao Xu <dongxiao.xu@xxxxxxxxx> wrote:
> For each socket in the system, we create a separate bitmap to tag its
> related CPUs. This per socket bitmap will be initialized on system
> start up, and adjusted when CPU is dynamically online/offline.

There's no reasoning here at all why cpu_sibling_mask and
cpu_core_mask aren't sufficient.

> --- a/xen/arch/x86/smpboot.c
> +++ b/xen/arch/x86/smpboot.c
> @@ -59,6 +59,9 @@ DEFINE_PER_CPU_READ_MOSTLY(cpumask_var_t, cpu_core_mask);
>  cpumask_t cpu_online_map __read_mostly;
>  EXPORT_SYMBOL(cpu_online_map);
>  
> +cpumask_t socket_cpu_map[MAX_NUM_SOCKETS] __read_mostly;
> +EXPORT_SYMBOL(socket_cpu_map);

And _if_ we really need it, then it should be done in a better way
than via a statically sized array, the size of which can't even be
overridden on the build and/or hypervisor command line.

And there shouldn't be EXPORT_SYMBOL() in new, not directly
cloned hypervisor code either.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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