On 26/05/2015 21:58, Jan Beulich wrote
> >>> On 13.05.16 at 09:50, <wei.w.w...@intel.com> wrote:
> > +    id = x86_match_cpu(intel_pstate_cpu_ids);
> > +    if (!id)
> > +        return -ENODEV;
> > +
> > +    cpu_info = (struct cpu_defaults *)id->driver_data;
> > +
> > +    copy_pid_params(&cpu_info->pid_policy);
> > +    copy_cpu_funcs(&cpu_info->funcs);
> > +    if (intel_pstate_msrs_not_valid())
> > +        return -ENODEV;
> > +
> > +    all_cpu_data = xzalloc_array(struct cpudata *,
> > + num_online_cpus());
> 
> This looks suspicious considering CPU hotplug, the more that this is the only
> place it gets allocated.

I just found that "num_possible_cpus()" is currently not usable for the x86 
code. Can we use the Xen supported max possible CPUs - NR_CPUS (usually it's 
256), i.e. all_cpu_data = xzalloc_array(struct cpudata *, NR_CPUS) ? 
Since each entry is just a pointer, this won't waste too much memory.

Best,
Wei

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

Reply via email to