Re: [Xen-devel] [PATCH v8 03/13] x86: maintain COS to CBM mapping for each socket

2015-06-01 Thread Chao Peng
On Mon, Jun 01, 2015 at 09:36:15AM +0100, Jan Beulich wrote: > >>> On 01.06.15 at 10:05, wrote: > > 2) Unfeasible to allocate memory first and do initialization later in > > cpu hotplug notifications. My former approach is performing both the > > allocation and initialization in the CPU_STARTING,

Re: [Xen-devel] [PATCH v8 03/13] x86: maintain COS to CBM mapping for each socket

2015-06-01 Thread Jan Beulich
>>> On 01.06.15 at 10:05, wrote: > 2) Unfeasible to allocate memory first and do initialization later in > cpu hotplug notifications. My former approach is performing both the > allocation and initialization in the CPU_STARTING, which is not a good > idea indicated by Jan. Considering

Re: [Xen-devel] [PATCH v8 03/13] x86: maintain COS to CBM mapping for each socket

2015-06-01 Thread Chao Peng
On Fri, May 29, 2015 at 04:38:31PM +0800, Chao Peng wrote: > On Fri, May 29, 2015 at 09:06:46AM +0100, Jan Beulich wrote: > > >>> On 29.05.15 at 04:43, wrote: > > > On Thu, May 28, 2015 at 02:17:54PM +0100, Jan Beulich wrote: > > >> >>> On 21.05.15 at 10:41, wrote: > > >> > +static int cat_cpu_in

Re: [Xen-devel] [PATCH v8 03/13] x86: maintain COS to CBM mapping for each socket

2015-05-29 Thread Chao Peng
On Fri, May 29, 2015 at 09:06:46AM +0100, Jan Beulich wrote: > >>> On 29.05.15 at 04:43, wrote: > > On Thu, May 28, 2015 at 02:17:54PM +0100, Jan Beulich wrote: > >> >>> On 21.05.15 at 10:41, wrote: > >> > +static int cat_cpu_init(unsigned int cpu) > >> > +{ > >> > +int rc; > >> > +const

Re: [Xen-devel] [PATCH v8 03/13] x86: maintain COS to CBM mapping for each socket

2015-05-29 Thread Jan Beulich
>>> On 29.05.15 at 04:43, wrote: > On Thu, May 28, 2015 at 02:17:54PM +0100, Jan Beulich wrote: >> >>> On 21.05.15 at 10:41, wrote: >> > +static int cat_cpu_init(unsigned int cpu) >> > +{ >> > +int rc; >> > +const struct cpuinfo_x86 *c = cpu_data + cpu; >> > + >> > +if ( !cpu_has(c, X

Re: [Xen-devel] [PATCH v8 03/13] x86: maintain COS to CBM mapping for each socket

2015-05-28 Thread Chao Peng
On Thu, May 28, 2015 at 02:17:54PM +0100, Jan Beulich wrote: > >>> On 21.05.15 at 10:41, wrote: > > For each socket, a COS to CBM mapping structure is maintained for each > > COS. The mapping is indexed by COS and the value is the corresponding > > CBM. Different VMs may use the same CBM, a refere

Re: [Xen-devel] [PATCH v8 03/13] x86: maintain COS to CBM mapping for each socket

2015-05-28 Thread Jan Beulich
>>> On 21.05.15 at 10:41, wrote: > For each socket, a COS to CBM mapping structure is maintained for each > COS. The mapping is indexed by COS and the value is the corresponding > CBM. Different VMs may use the same CBM, a reference count is used to > indicate if the CBM is available. > > Signed-