RE: [PATCH v6 1/5] xen/device-tree: Parse 'cpu-map' node for CPU topology exploration
Hirokazu Takahashi <[email protected]>
| Newsgroups | org.xenproject.lists.xen-devel |
|---|---|
| Message-ID | <OS9P286MB722280A3A0E6E36B8194501B82C42@OS9P286MB7222.JPNP286.PROD.OUTLOOK.COM> |
Hi Jan,
> > +/* SPDX-License-Identifier: GPL-2.0-only */
> > +
> > +#ifndef XEN_CPU_TOPOLOGY_H
> > +#define XEN_CPU_TOPOLOGY_H
> > +
> > +#include <xen/cpumask.h>
> > +
> > +#ifdef CONFIG_GENERIC_CPU_TOPOLOGY
> > +
> > +struct cpu_topology {
> > + cpumask_var_t thread_sibling;
>
> Btw, as this aspect becomes more apparent when looking at patch 2: What is the
> relationship of this (i.e. cpu_topology[cpu].thread_sibling) to
> per_cpu(cpu_sibling_mask, cpu)? The two ought to be identical, but I can't see
> this being guaranteed. And if they were identical, why would both be needed?
>
> > + cpumask_var_t core_sibling;
>
> Same for this vs the per-CPU cpu_core_mask.
I have considered the same thing before. However, considering the CPU hotplug
support that Mykyta Poturai is currently implementing, it is difficult to remove
thread_sibling and core_sibling from struct cpu_topology. We intend to use
cpu_topology to hold information for CPUs that haven't been hotplugged yet.
While it might make more sense to remove the per-CPU masks instead,
I hesitated to do so because the impact on x86 Xen would be quite large.
Thank you,
Hirokazu Takahashi.