Skip to content

x86/platform/uv: Use alternate source for socket to node data

Frank Ramsay requested to merge framsay1234/centos-stream-9:RHEL-11428 into main

JIRA: https://issues.redhat.com/browse/RHEL-11428

Upstream Status: 5290e88ba2c742ca77c5f5b690e5af549cfd8591

commit 5290e88ba2c742ca77c5f5b690e5af549cfd8591

Author: Steve Wahl steve.wahl@hpe.com

Date: Mon, 7 Aug 2023 09:17:30 -0500

The UV code attempts to build a set of tables to allow it to do bidirectional socket<=>node lookups.

But when nr_cpus is set to a smaller number than actually present, the cpu_to_node() mapping information for unused CPUs is not available to build_socket_tables(). This results in skipping some nodes or sockets when creating the tables and leaving some -1's for later code to trip. over, causing oopses.

The problem is that the socket<=>node lookups are created by doing a loop over all CPUs, then looking up the CPU's APICID and socket. But if a CPU is not present, there is no way to start this lookup.

Instead of looping over all CPUs, take CPUs out of the equation entirely. Loop over all APICIDs which are mapped to a valid NUMA node. Then just extract the socket-id from the APICID.

This avoid tripping over disabled CPUs.

Signed-off-by: Frank Ramsay framsay@redhat.com

Edited by Frank Ramsay

Merge request reports