From 6a77351f3cbeb54ea0327876afc15aada524d064 Mon Sep 17 00:00:00 2001 From: Pingfan Liu Date: Mon, 7 Jul 2025 08:23:37 +0800 Subject: [PATCH] Release 2.0.19-3 Resolves: https://issues.redhat.com/browse/RHEL-118763 Signed-off-by: Pingfan Liu --- ...-fails-on-LPAR-which-is-not-having-n.patch | 34 +++++++++++++++++++ numactl.spec | 3 +- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 0003-numastat-command-fails-on-LPAR-which-is-not-having-n.patch diff --git a/0003-numastat-command-fails-on-LPAR-which-is-not-having-n.patch b/0003-numastat-command-fails-on-LPAR-which-is-not-having-n.patch new file mode 100644 index 0000000..efe1d5e --- /dev/null +++ b/0003-numastat-command-fails-on-LPAR-which-is-not-having-n.patch @@ -0,0 +1,34 @@ +From 690a72cabb010d02c910f54782641737bf947e77 Mon Sep 17 00:00:00 2001 +From: Seeteena Thoufeek +Date: Wed, 18 Jun 2025 10:22:23 +0530 +Subject: [PATCH] numastat command fails on LPAR which is not having node0 + +We see the device path hardcoded with node0. +it presumes node0 always exist, and it just counts +the number of rows of information in the file for later +uses where it does process the nodes as expected. + +Signed-off-by: Seeteena Thoufeek +--- + numastat.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/numastat.c b/numastat.c +index 7683f07..54d201c 100644 +--- a/numastat.c ++++ b/numastat.c +@@ -782,8 +782,9 @@ static void show_info_from_system_file(char *file, int tok_offset) + { + char fname[64]; + char buf[SMALL_BUF_SIZE]; +- // Open /sys/.../node0/ +- snprintf(fname, sizeof(fname), "/sys/devices/system/node/node0/%s", file); ++ ++ // Use the first available node for initial row counting ++ snprintf(fname, sizeof(fname), "/sys/devices/system/node/node%d/%s", node_ix_map[0], file); + FILE *fs = fopen(fname, "r"); + if (!fs) { + sprintf(buf, "cannot open %s", fname); +-- +2.49.0 + diff --git a/numactl.spec b/numactl.spec index ebedc06..1ce87dc 100644 --- a/numactl.spec +++ b/numactl.spec @@ -1,7 +1,7 @@ Name: numactl Summary: Library for tuning for Non Uniform Memory Access machines Version: 2.0.19 -Release: 2%{?dist} +Release: 3%{?dist} # libnuma is LGPLv2 and GPLv2 # numactl binaries are GPLv2 only License: GPL-2.0-only @@ -16,6 +16,7 @@ ExcludeArch: s390 %{arm} # Patch601: 0001-Fix-fallback-for-set_mempolicy_home_node-syscall.patch Patch001: 0001-libnuma.c-Introduce-numa_preferred_err.patch Patch002: 0002-doc-Update-man-for-numa_preferred_err.patch +Patch003: 0003-numastat-command-fails-on-LPAR-which-is-not-having-n.patch %description Simple NUMA policy support. It consists of a numactl program to run