|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 4/6] x86: bring up all CPUs even if not all are supposed to be used
On Wed, Jul 18, 2018 at 02:21:53AM -0600, Jan Beulich wrote:
> --- a/xen/arch/x86/mpparse.c
> +++ b/xen/arch/x86/mpparse.c
> @@ -68,19 +68,26 @@ physid_mask_t phys_cpu_present_map;
>
> void __init set_nr_cpu_ids(unsigned int max_cpus)
> {
> + unsigned int tot_cpus = num_processors + disabled_cpus;
> +
> if (!max_cpus)
> - max_cpus = num_processors + disabled_cpus;
> + max_cpus = tot_cpus;
> if (max_cpus > NR_CPUS)
> max_cpus = NR_CPUS;
> else if (!max_cpus)
> max_cpus = 1;
> printk(XENLOG_INFO "SMP: Allowing %u CPUs (%d hotplug CPUs)\n",
> max_cpus, max_t(int, max_cpus - num_processors, 0));
> - nr_cpu_ids = max_cpus;
> +
> + if (!park_offline_cpus)
> + tot_cpus = max_cpus;
> + nr_cpu_ids = min(tot_cpus, NR_CPUS + 0u);
> + if (park_offline_cpus && nr_cpu_ids < num_processors)
> + printk(XENLOG_WARNING "SMP: Cannot bring up %u further CPUs\n",
> + num_processors - nr_cpu_ids);
Minor nit:
Maybe it is just me, but "Cannot" is normally used when an operation
fails, I would use "Won't" to indicate this is a deliberate action, not
a consequence of failure, or say "Skip bringing up ...".
Whatever this log message ends up like:
Reviewed-by: Wei Liu <wei.liu2@xxxxxxxxxx>
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |