diff --git a/0005-numactl.c-Remove-unused-variable.patch b/0005-numactl.c-Remove-unused-variable.patch new file mode 100644 index 0000000000000000000000000000000000000000..653a87b86ce2573abb122f25e9684bd6c777ac6a --- /dev/null +++ b/0005-numactl.c-Remove-unused-variable.patch @@ -0,0 +1,35 @@ +From c09fefddf5474b393f262f92659134355d98c550 Mon Sep 17 00:00:00 2001 +From: Honggyu Kim +Date: Sat, 24 Dec 2022 03:19:14 +0000 +Subject: [PATCH] numactl.c: Remove unused variable + +This patch is to remove the following unused variable warning. + + numactl.c: In function 'main': + numactl.c:425:14: warning: unused variable 'node' [-Wunused-variable] + 425 | long node=-1; + | ^~~~ + +Since node is used nowhere inside the function so remove it. + +Signed-off-by: Honggyu Kim +Signed-off-by: buque +--- + numactl.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/numactl.c b/numactl.c +index 79b323b..47cbf39 100755 +--- a/numactl.c ++++ b/numactl.c +@@ -422,7 +422,6 @@ static struct bitmask *numactl_parse_nodestring(char *s, int flag) + int main(int ac, char **av) + { + int c; +- long node=-1; + char *end; + char shortopts[array_len(opts)*2 + 1]; + struct bitmask *mask = NULL; +-- +2.33.0 + diff --git a/0006-numactl.c-Fix-merging-of-neighboring-pages-policies-.patch b/0006-numactl.c-Fix-merging-of-neighboring-pages-policies-.patch new file mode 100644 index 0000000000000000000000000000000000000000..78d039963bf94d4e36840deab477725b763d2dfe --- /dev/null +++ b/0006-numactl.c-Fix-merging-of-neighboring-pages-policies-.patch @@ -0,0 +1,39 @@ +From 6587ed2e4b8ce6d1eb0812f89709101f2bfdd1f1 Mon Sep 17 00:00:00 2001 +From: Ackerley Tng +Date: Wed, 15 Mar 2023 00:23:14 +0000 +Subject: [PATCH] numactl.c: Fix merging of neighboring pages' policies in + dump_shm + +In addition to checking that the policies are equal, also check that +the nodes are equal, since the policies may be the same but apply to +different nodes. + +Fixes #170 + +Signed-off-by: buque +--- + shm.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/shm.c b/shm.c +index 5d0d1ab..66dbea4 100644 +--- a/shm.c ++++ b/shm.c +@@ -205,11 +205,12 @@ void dump_shm(void) + if (get_mempolicy(&pol, nodes->maskp, nodes->size, c+shmptr, + MPOL_F_ADDR) < 0) + err("get_mempolicy on shm"); +- if (pol == prevpol) ++ if (pol == prevpol && numa_bitmask_equal(prevnodes, nodes)) + continue; + if (prevpol != -1) + dumppol(start, c, prevpol, prevnodes); +- prevnodes = nodes; ++ ++ copy_bitmask_to_bitmask(nodes, prevnodes); + prevpol = pol; + start = c; + } +-- +2.33.0 + diff --git a/numactl.spec b/numactl.spec index 33dfdb67ba9d923ac9b3568712f0535ac846b20e..7b8f6a4013d9487db987bd559c5fae06ec98a09d 100644 --- a/numactl.spec +++ b/numactl.spec @@ -1,6 +1,6 @@ Name: numactl Version: 2.0.16 -Release: 4 +Release: 5 Summary: Library for tuning for Non Uniform Memory Access machines License: GPLv2 URL: https://github.com/numactl/numactl @@ -11,6 +11,8 @@ Patch0001: 0001-libnuma-clear-errno-at-the-end-of-numa_init.patch Patch0002: 0002-numactl-Fix-shm-verfiy-for-preferred-policy.patch Patch0003: 0003-numactl-numactl-length-xxx-shm-xxx-px-doesn-t-work.patch Patch0004: 0004-fix-wrong-nodemask_sz-when-CONFIG_NODES_SHIFT-is-les.patch +Patch0005: 0005-numactl.c-Remove-unused-variable.patch +Patch0006: 0006-numactl.c-Fix-merging-of-neighboring-pages-policies-.patch %description Simple NUMA policy support. It consists of a numactl program to run other @@ -79,6 +81,9 @@ LD_LIBRARY_PATH=$(pwd)/.libs make check %{_mandir}/man3/*.3* %changelog +* Mon Jun 19 2023 wuxu - 2.0.16-5 +- numactl.c: Fix merging of neighboring pages' policies in dump_shm and remove unused variable + * Mon Jun 19 2023 wuxu - 2.0.16-4 - fix wrong nodemask_sz when CONFIG_NODES_SHIFT is less than 5