[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [PATCH v2 07/24] xen/device-tree: Parse 'cpu-map' node for CPU topology exploration
- To: Hirokazu Takahashi <taka@xxxxxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>
- From: Hirokazu Takahashi <taka@xxxxxxxxxxxxx>
- Date: Wed, 3 Jun 2026 13:01:04 +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=NHA8e+zbCgQWy8ZB117jcqSzUU8nXq9UdwZpZDQxgn0=; b=NkRH1yYVDS4zcyNxEWQg7GJUHBbjkoE5Brqak0JZTxhLGgS4Af1SboqbdG3SctBjvLixDsdKGP3iuglI252Xjps9WjB55RLopRgtprj+ySOvaGTYgrWty6vpJwiL95WFQt4TNPNJnKGH/sDtJs1KHq9crwAw5dFCm+sP9qQNGLf5UG5Hp9gLe5pfnCqolwNFIPfwrAQUCmgPXKRRh7RSj0/tEQDE/fz2lFCPHHmpBz2GF8ITHWMcMJL7uTwY6EqOjZP6aaCSx6YlBqE44CzpB6zb9ezrYBiyDlBAqJH1KhzMhp7M2dFCqcvlJzOmBJNlwMMHqFIyiDWk30Gb6B8ByQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Rf2XGnE50FMA7tP+bmT8aAAZUrkCLVmsSt7Z+75ZICX4COBBrCFvrQfAaGuPPk/kkgjenLGRfsxl55zL77ko/obobqXObzrwG5/jbwtQhZxnIXNCwDQk3ifx1ZfIbOGUd7HiQAJicVLhXIiRD6isGRtwsMoFziF3DBctuJIJaBntPAxMcrOGjz2jrk7hCFPdOA92hAeAz6ioRRjTgtor6IUL5TpLazLsRlVqZLIzZMIKAp9JBjz/oXHpW5PjEUCWMRobQ2Nn2fKqxlmjgx76PK4lXeTZkxd9HFdwGBKg5PDmlENkkSQjKgvZbv2Ziy/0BpgcnCmwKg7st1Jsr7poWw==
- 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: 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: Wed, 03 Jun 2026 13:01:27 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHc8U+PsZhvkHY9vEqKRtt8NHnfGrYrBomAgAF93dCAAEeY4A==
- Thread-topic: [PATCH v2 07/24] xen/device-tree: Parse 'cpu-map' node for CPU topology exploration
Hello,
> > > +
> > > +#ifdef CONFIG_DT_CPU_TOPOLOGY
> > > +extern struct cpu_topology cpu_topology[NR_CPUS];
> >
> > If at all possible, no new NR_CPUS dimensioned arrays please.
>
> This is also part of the code imported from Linux kernel 7.0, which is used to
> store
> unique topology data per CPU.
>
> I kept it as an array to match the original Linux source, but I understand the
> concern
> about adding new NR_CPUS dimensioned arrays in Xen. I can refactor it to use
> Xen's
> per-CPU infrastructure instead.
Just a quick follow-up to my previous email:
While I was looking into moving the topology data to a per-CPU variable,
I remembered the ongoing effort by the team working on CPU hotplug.
This introduces a dilemma: during the early boot phase when we parse
the Device Tree topology, the per-CPU areas for CPUs that are not yet active
(or yet to be hotplugged) have not been allocated yet. Therefore, we wouldn't
have a place to record the topology information for those inactive CPUs
at boot time.
Should we have the hotplug team parse the Device Tree topology information
on-demand when a CPU is hot-plugged?
Currently, the functions used to read the topology from the Device Tree are
marked with '__init'. Removing '__init' to keep these functions resident in
memory feels like a waste of memory.
What do you think would be the best approach here?
Thank you,
Hirokazu Takahashi.
|