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

RE: [PATCH v6 1/5] xen/device-tree: Parse 'cpu-map' node for CPU topology exploration


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Hirokazu Takahashi <taka@xxxxxxxxxxxxx>
  • Date: Mon, 20 Jul 2026 13:58:40 +0000
  • Accept-language: ja-JP, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=valinux.co.jp; dmarc=pass action=none header.from=valinux.co.jp; dkim=pass header.d=valinux.co.jp; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=fSYn3GTdMh9uIo67hUNajliknLF5kASQdRj+mh5V/QQ=; b=sGvglbrkq/Mr9YNyschz9kwH+8PdIM0Xh9HtUGtVJgZyicIAOsv6xU5nQjBssZO1s46eDnAdu1eBug+9099TFd/6hopkh1wyk/GM7+k81iz/dSGA2OQ0d/HIAcKLwKIu8/3gvfgENs8o7g95xA8etMKhu9nJhAunfjFnCcX0p+//KHaskhWhpiRY2GBsuRgw6Sv0jmpn9yiBJP8QeZU9VkKjK7Gxa/KxzSlP5smQqsRUGXRBRMy4ieJpCIbLMoKl3NSkJKmhFK/cNRvlGZCm1YF0TaulEvgSE1ff/49CmUywYSaKo0wyvRY+AY9GAWBCbetCSJozvy+mAfericyJqQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=NV19UG1HN/wyso/4gmKi8fttUh+ZHKttaJ1qfJNe+sH0y18IVbzXEVyxHJwd/QXJjRQyrZbTnh+qscw2IKJ9r/gtherLQ9FYaiU+GdVaYU6SLXfjqNSUQvRCoeEG0lFuOUreH+ufPhPuJUBMDK7fEipqC4tPF8SgZeHcTF8+eiE5HJ/diqc9kyQG/mEowQ9LnRPsAmAAZgd+04SzFdURF/9jVkfx14JQLMEHgzDkpYBR86Fg3jtK/eFRDTDIPXnla+uhFgKa78EQH9B6JkqH8YYr2uI4T7TeS5kCAPKkEA27HmvT/LdFYrsRnWjHddFo+UEJqjr6jvnzrNyWyJLrGg==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=valinux.co.jp header.i="@valinux.co.jp" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:x-ms-exchange-senderadcheck"
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=valinux.co.jp;
  • Cc: "Mykyta_Poturai@xxxxxxxx" <Mykyta_Poturai@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 20 Jul 2026 13:59:02 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHdE33lRSerj/u3kU6sfibELhxcvrZwJ2MAgAPosBCAAmbKUA==
  • Thread-topic: [PATCH v6 1/5] xen/device-tree: Parse 'cpu-map' node for CPU topology exploration

Hello,

I suspect that when CPU hotplug is implemented, cpu_topology[cpu].core_sibling
And per_cpu(cpu_core_mask, cpu) will actually diverge.
cpu_topology[cpu].core_sibling will include reserved CPUs that may be hotplugged
in the future, whereas per_cpu(cpu_sibling_mask, cpu) will only track currently
active CPUs.

> > > +/* 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.

 


Rackspace

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