lkml.org 
[lkml]   [2023]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] x86/platform/uv: Abort UV initialization when reduced nr_cpus requires it
From
On 7/11/23 13:26, Steve Wahl wrote:
> When nr_cpus is set to a smaller number than actually present, there
> is some node-to-socket mapping info we won't get access to in

First of all, no "we's" in commit messages.

> https://www.kernel.org/doc/html/next/process/maintainer-tip.html#changelog

> build_socket_tables(). This could later result in using a -1 value
> for some array indexing, and eventual kernel page faults.
>
> To avoid this, if any unfilled table entries are found, print a
> warning message, and resume initializing, acting as if this is not a
> UV system. UV features will be unavailable, but we will not cause
> kernel dumps.
>
> This is a condition we expect only in platform debugging situations,
> not in day-to-day operation.

This seems like a hack.

The real problem is that you've got an online Linux NUMA node with no
CPUs. uv_system_init_hub() (probably) goes and does:

> for_each_node(nodeid)
> __uv_hub_info_list[nodeid] = uv_hub_info_list_blade[uv_node_to_blade_id(nodeid)];

But the node=>blade lookup uses socket numbers. No CPUs means no socket
numbers. You _have_ the blade information _somewhere_. Is there really
no other way to map it to a NUMA node than using the CPU apicid?

\
 
 \ /
  Last update: 2023-07-12 01:08    [W:0.036 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site