Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package numactl for openSUSE:Factory checked 
in at 2025-04-15 16:45:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/numactl (Old)
 and      /work/SRC/openSUSE:Factory/.numactl.new.1907 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "numactl"

Tue Apr 15 16:45:09 2025 rev:76 rq:1269207 version:2.0.19.13.g63e0223

Changes:
--------
--- /work/SRC/openSUSE:Factory/numactl/numactl.changes  2024-10-11 
17:01:34.756824067 +0200
+++ /work/SRC/openSUSE:Factory/.numactl.new.1907/numactl.changes        
2025-04-15 16:48:12.740898459 +0200
@@ -1,0 +2,12 @@
+Fri Apr 11 12:36:18 UTC 2025 - tr...@suse.de
+
+- Update to version 2.0.19.13.g63e0223:
+  * libnuma.c: Introduce numa_preferred_err()
+  * numactl: Add --show option support for MPOL_WEIGHTED_INTERLEAVE
+  * Add numa_get_weighted_interleave_mask() API
+  * libnuma: Add APIs for weighted-interleaved allocations
+  * libnuma.c: Fix memleak in numa_has_home_node()
+  * Replace fgrep with grep -F to fix warning
+  * Make numa_available respect EPERM
+
+-------------------------------------------------------------------

Old:
----
  numactl-2.0.18.10.g6c14bd5.obscpio

New:
----
  numactl-2.0.19.13.g63e0223.obscpio

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ numactl.spec ++++++
--- /var/tmp/diff_new_pack.qDj0pT/_old  2025-04-15 16:48:13.508930618 +0200
+++ /var/tmp/diff_new_pack.qDj0pT/_new  2025-04-15 16:48:13.508930618 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           numactl
-Version:        2.0.18.10.g6c14bd5
+Version:        2.0.19.13.g63e0223
 Release:        0
 Summary:        NUMA Policy Control
 License:        GPL-2.0-only

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.qDj0pT/_old  2025-04-15 16:48:13.580933633 +0200
+++ /var/tmp/diff_new_pack.qDj0pT/_new  2025-04-15 16:48:13.580933633 +0200
@@ -3,6 +3,6 @@
                 <param name="url">https://github.com/numactl/numactl</param>
               <param 
name="changesrevision">4bfdcc6e6111c5bf5d4ccb46f227aea80cc57159</param></service><service
 name="tar_scm">
                 <param name="url">http://github.com/numactl/numactl</param>
-              <param 
name="changesrevision">6c14bd59d438ebb5ef828e393e8563ba18f59cb2</param></service></servicedata>
+              <param 
name="changesrevision">63e02235bdbcf5aa334903be2111a82b27c8c155</param></service></servicedata>
 (No newline at EOF)
 

++++++ numactl-2.0.18.10.g6c14bd5.obscpio -> numactl-2.0.19.13.g63e0223.obscpio 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/numactl-2.0.18.10.g6c14bd5/Makefile.am 
new/numactl-2.0.19.13.g63e0223/Makefile.am
--- old/numactl-2.0.18.10.g6c14bd5/Makefile.am  2024-09-17 15:45:02.000000000 
+0200
+++ new/numactl-2.0.19.13.g63e0223/Makefile.am  2025-01-28 06:24:03.000000000 
+0100
@@ -16,7 +16,7 @@
 
 EXTRA_DIST = README.md INSTALL.md LICENSE.GPL2 LICENSE.LGPL2.1
 
-numactl_SOURCES = numactl.c util.c shm.c shm.h VERSION
+numactl_SOURCES = numactl.c util.c sysfs.c shm.c shm.h VERSION
 numactl_LDADD = libnuma.la
 numactl_CFLAGS = $(AM_CFLAGS) -DVERSION=\"$(shell cat ${srcdir}/VERSION)\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/numactl-2.0.18.10.g6c14bd5/VERSION 
new/numactl-2.0.19.13.g63e0223/VERSION
--- old/numactl-2.0.18.10.g6c14bd5/VERSION      2024-09-17 15:45:02.000000000 
+0200
+++ new/numactl-2.0.19.13.g63e0223/VERSION      2025-01-28 06:24:03.000000000 
+0100
@@ -1 +1 @@
-2.1
+2.0.19
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/numactl-2.0.18.10.g6c14bd5/configure 
new/numactl-2.0.19.13.g63e0223/configure
--- old/numactl-2.0.18.10.g6c14bd5/configure    2024-09-17 15:45:02.000000000 
+0200
+++ new/numactl-2.0.19.13.g63e0223/configure    2025-01-28 06:24:03.000000000 
+0100
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.71 for numactl 2.0.16.
+# Generated by GNU Autoconf 2.71 for numactl 2.0.19.
 #
 #
 # Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
@@ -618,8 +618,8 @@
 # Identity of this package.
 PACKAGE_NAME='numactl'
 PACKAGE_TARNAME='numactl'
-PACKAGE_VERSION='2.0.16'
-PACKAGE_STRING='numactl 2.0.16'
+PACKAGE_VERSION='2.0.19'
+PACKAGE_STRING='numactl 2.0.19'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1353,7 +1353,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures numactl 2.0.16 to adapt to many kinds of systems.
+\`configure' configures numactl 2.0.19 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1424,7 +1424,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of numactl 2.0.16:";;
+     short | recursive ) echo "Configuration of numactl 2.0.19:";;
    esac
   cat <<\_ACEOF
 
@@ -1535,7 +1535,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-numactl configure 2.0.16
+numactl configure 2.0.19
 generated by GNU Autoconf 2.71
 
 Copyright (C) 2021 Free Software Foundation, Inc.
@@ -1753,7 +1753,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by numactl $as_me 2.0.16, which was
+It was created by numactl $as_me 2.0.19, which was
 generated by GNU Autoconf 2.71.  Invocation command line was
 
   $ $0$ac_configure_args_raw
@@ -3029,7 +3029,7 @@
 
 # Define the identity of the package.
  PACKAGE='numactl'
- VERSION='2.0.16'
+ VERSION='2.0.19'
 
 
 printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
@@ -14465,7 +14465,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by numactl $as_me 2.0.16, which was
+This file was extended by numactl $as_me 2.0.19, which was
 generated by GNU Autoconf 2.71.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -14533,7 +14533,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config='$ac_cs_config_escaped'
 ac_cs_version="\\
-numactl config.status 2.0.16
+numactl config.status 2.0.19
 configured by $0, generated by GNU Autoconf 2.71,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/numactl-2.0.18.10.g6c14bd5/libnuma.c 
new/numactl-2.0.19.13.g63e0223/libnuma.c
--- old/numactl-2.0.18.10.g6c14bd5/libnuma.c    2024-09-17 15:45:02.000000000 
+0200
+++ new/numactl-2.0.19.13.g63e0223/libnuma.c    2025-01-28 06:24:03.000000000 
+0100
@@ -144,8 +144,8 @@
  * The following bitmask declarations, bitmask_*() routines, and associated
  * _setbit() and _getbit() routines are:
  * Copyright (c) 2004_2007 Silicon Graphics, Inc. (SGI) All rights reserved.
- * SGI publishes it under the terms of the GNU General Public License, v2,
- * as published by the Free Software Foundation.
+ * SGI publishes it under the terms of the Library GNU General Public License,
+ * v2, as published by the Free Software Foundation.
  */
 static unsigned int
 _getbit(const struct bitmask *bmp, unsigned int n)
@@ -862,7 +862,7 @@
 
 long numa_node_size(int node, long *freep)
 {
-       long long f2;
+       long long f2 = 0;
        long sz = numa_node_size64_int(node, &f2);
        if (freep)
                *freep = f2;
@@ -871,7 +871,7 @@
 
 int numa_available(void)
 {
-       if (get_mempolicy(NULL, NULL, 0, 0, 0) < 0 && errno == ENOSYS)
+       if (get_mempolicy(NULL, NULL, 0, 0, 0) < 0 && (errno == ENOSYS || errno 
== EPERM))
                return -1;
        return 0;
 }
@@ -894,6 +894,12 @@
        dombind(mem, size, MPOL_INTERLEAVE, bmp);
 }
 
+void
+numa_weighted_interleave_memory(void *mem, size_t size, struct bitmask *bmp)
+{
+       dombind(mem, size, MPOL_WEIGHTED_INTERLEAVE, bmp);
+}
+
 void numa_tonode_memory(void *mem, size_t size, int node)
 {
        struct bitmask *nodes;
@@ -1007,6 +1013,25 @@
        return numa_alloc_interleaved_subset_v2_int(size, numa_all_nodes_ptr);
 }
 
+void *
+numa_alloc_weighted_interleaved_subset(size_t size, struct bitmask *bmp)
+{
+       char *mem;
+
+       mem = mmap(0, size, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
+                  0, 0);
+       if (mem == (char *)-1)
+               return NULL;
+       dombind(mem, size, MPOL_WEIGHTED_INTERLEAVE, bmp);
+       return mem;
+}
+
+void *
+numa_alloc_weighted_interleaved(size_t size)
+{
+       return numa_alloc_weighted_interleaved_subset(size, numa_all_nodes_ptr);
+}
+
 /*
  * given a user node mask, set memory policy to use those nodes
  */
@@ -1050,7 +1075,7 @@
 nodemask_t
 numa_get_interleave_mask_v1(void)
 {
-       int oldpolicy;
+       int oldpolicy = 0;
        struct bitmask *bmp;
        nodemask_t mask;
 
@@ -1070,7 +1095,7 @@
 struct bitmask *
 numa_get_interleave_mask_v2(void)
 {
-       int oldpolicy;
+       int oldpolicy = 0;
        struct bitmask *bmp;
 
        bmp = numa_allocate_nodemask();
@@ -1082,6 +1107,21 @@
        return bmp;
 }
 
+struct bitmask *
+numa_get_weighted_interleave_mask(void)
+{
+       int oldpolicy = 0;
+       struct bitmask *bmp;
+
+       bmp = numa_allocate_nodemask();
+       if (!bmp)
+               return NULL;
+       getpol(&oldpolicy, bmp);
+       if (oldpolicy != MPOL_WEIGHTED_INTERLEAVE)
+               copy_bitmask_to_bitmask(numa_no_nodes_ptr, bmp);
+       return bmp;
+}
+
 /* (undocumented) */
 int numa_get_interleave_node(void)
 {
@@ -1226,7 +1266,7 @@
 nodemask_t
 numa_get_membind_v1(void)
 {
-       int oldpolicy;
+       int oldpolicy = 0;
        struct bitmask *bmp;
        nodemask_t nmp;
 
@@ -1249,8 +1289,8 @@
 struct bitmask *
 numa_get_membind_v2(void)
 {
-       int oldpolicy;
-       struct bitmask *bmp;
+       int oldpolicy = 0;
+       struct bitmask *bmp = NULL;
 
        bmp = numa_allocate_nodemask();
        if (!bmp)
@@ -1883,7 +1923,7 @@
 
 static struct bitmask *__numa_preferred(void)
 {
-       int policy;
+       int policy = 0;
        struct bitmask *bmp;
 
        bmp = numa_allocate_nodemask();
@@ -1907,7 +1947,7 @@
        return bmp;
 }
 
-int numa_preferred(void)
+int numa_preferred_err(void)
 {
        int first_node = 0;
        struct bitmask *bmp;
@@ -1919,6 +1959,16 @@
        return first_node;
 }
 
+int numa_preferred(void)
+{
+       int first_node = 0;
+
+       first_node = numa_preferred_err();
+       first_node = first_node >= 0 ? first_node : 0;
+
+       return first_node;
+}
+
 static void __numa_set_preferred(struct bitmask *bmp)
 {
        int nodes = numa_bitmask_weight(bmp);
@@ -2278,6 +2328,7 @@
        }
 
 out:
+       numa_bitmask_free(tmp);
        return has_home_node;
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/numactl-2.0.18.10.g6c14bd5/numa.3 
new/numactl-2.0.19.13.g63e0223/numa.3
--- old/numactl-2.0.18.10.g6c14bd5/numa.3       2024-09-17 15:45:02.000000000 
+0200
+++ new/numactl-2.0.19.13.g63e0223/numa.3       2025-01-28 06:24:03.000000000 
+0100
@@ -64,6 +64,8 @@
 .sp
 .B int numa_preferred(void);
 .br
+.B int numa_preferred_err(void);
+.br
 .B int numa_has_preferred_many(void);
 .br
 .B struct bitmask *numa_preferred_many(void);
@@ -84,6 +86,12 @@
 .br
 .BI "void numa_interleave_memory(void *" start ", size_t " size ", struct 
bitmask *" nodemask );
 .br
+.B struct bitmask *numa_get_weighted_interleave_mask(void);
+.br
+.BI "void numa_set_weighted_interleave_mask(struct bitmask *" nodemask );
+.br
+.BI "void numa_weighted_interleave_memory(void *" start ", size_t " size ", 
struct bitmask *" nodemask );
+.br
 .BI "void numa_bind(struct bitmask *" nodemask );
 .br
 .BI "void numa_set_localalloc(void);
@@ -101,6 +109,11 @@
 .BI "void *numa_alloc_interleaved(size_t " size );
 .br
 .BI "void *numa_alloc_interleaved_subset(size_t " size ",  struct bitmask *" 
nodemask );
+.br
+.BI "void *numa_alloc_weighted_interleaved(size_t " size );
+.br
+.BI "void *numa_alloc_weighted_interleaved_subset(size_t " size ", struct 
bitmask *" nodemask );
+.br
 .BI "void *numa_alloc(size_t " size );
 .br
 .BI "void *numa_realloc(void *"old_addr ", size_t " old_size ", size_t " 
new_size );
@@ -437,6 +450,10 @@
 .\" order of the current node's zonelist to return the correct
 .\" node.  Need to tighten this up with the syscall results.
 
+.BR numa_preferred_err ()
+Similiar to numa_preferred(), but If the preferred node is unavailable,
+return an error instead of zero.
+
 .BR numa_has_preferred_many ()
 Returns > 0 if the system supports multiple preferred nodes.
 
@@ -505,6 +522,25 @@
 .\" or
 .\" .BR numa_alloc_interleaved_subset ().
 
+.BR numa_get_weighted_interleave_mask ()
+returns the current weighted interleave mask if the task's memory
+allocation policy is weighted interleaving.
+Otherwise, this function returns an empty mask.
+
+.BR numa_set_weighted_interleave_mask ()
+sets the memory weighted interleave mask for the current task to
+.IR nodemask .
+All new memory allocations
+are weighted-interleaved over all nodes in the weighted interleave mask,
+according to the weights in
+.I /sys/kernel/mm/mempolicy/weighted_interleave/node*.
+Interleaving can be turned off again by passing an empty mask
+.RI ( numa_no_nodes ) .
+The weighted interleaving only occurs on the actual page fault that puts a
+new page into the current address space. It is also only a hint: the kernel
+will fall back to other nodes if no memory is available on the weighted
+interleave target.
+
 .BR numa_interleave_memory ()
 interleaves
 .I size
@@ -537,6 +573,41 @@
 flag is true then the operation will cause a numa_error if there were already
 pages in the mapping that do not follow the policy.
 
+.BR numa_weighted_interleave_memory ()
+interleaves
+.I size
+bytes of memory page by page from
+.I start
+on nodes specified in
+.IR nodemask
+according to the weights in
+.I /sys/kernel/mm/mempolicy/weighted_interleave/node*.
+The
+.I size
+argument will be rounded up to a multiple of the system page size.
+If
+.I nodemask
+contains nodes that are externally denied to this process,
+this call will fail.
+This is a lower level function to interleave allocated but not yet faulted in
+memory. Not yet faulted in means the memory is allocated using
+.BR mmap (2)
+or
+.BR shmat (2),
+but has not been accessed by the current process yet. The memory is page
+interleaved to all nodes specified in
+.IR nodemask .
+Normally
+.BR numa_alloc_weighted_interleaved ()
+should be used for private memory instead, but this function is useful to
+handle shared memory areas. To be useful the memory area should be
+several megabytes at least (or tens of megabytes of hugetlbfs mappings)
+If the
+.BR numa_set_strict ()
+flag is true then the operation will cause a numa_error if there were already
+pages in the mapping that do not follow the policy.
+
+
 .BR numa_bind ()
 binds the current task and its children to the nodes
 specified in
@@ -636,10 +707,46 @@
 .BR numa_free ().
 On error, NULL is returned.
 
+.BR numa_alloc_weighted_interleaved ()
+allocates
+.I size
+bytes of memory page interleaved on all nodes according to the weights in
+.I /sys/kernel/mm/mempolicy/weighted_interleave/node*.
+This function is relatively slow and should only be used for large areas
+consisting of multiple pages. The interleaving works at page level and will
+only show an effect when the area is large.
+The allocated memory must be freed with
+.BR numa_free ().
+On error, NULL is returned.
+
 .BR numa_alloc_interleaved_subset ()
 attempts to allocate
 .I size
-bytes of memory page interleaved on all nodes.
+bytes of memory page interleaved on nodes specified in
+.IR nodemask .
+The
+.I size
+argument will be rounded up to a multiple of the system page size.
+The nodes on which a process is allowed to allocate memory may
+be constrained externally.
+If this is the case, this function may fail.
+This function is relatively slow compared to the
+.IR malloc (3)
+family of functions and should only be used for large areas consisting
+of multiple pages.
+The interleaving works at page level and will only show an effect when the
+area is large.
+The allocated memory must be freed with
+.BR numa_free ().
+On error, NULL is returned.
+
+.BR numa_alloc_weighted_interleaved_subset ()
+attempts to allocate
+.I size
+bytes of memory page interleaved on nodes specified in
+.IR nodemask
+according to the weights in
+.I /sys/kernel/mm/mempolicy/weighted_interleave/node*.
 The
 .I size
 argument will be rounded up to a multiple of the system page size.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/numactl-2.0.18.10.g6c14bd5/numa.h 
new/numactl-2.0.19.13.g63e0223/numa.h
--- old/numactl-2.0.18.10.g6c14bd5/numa.h       2024-09-17 15:45:02.000000000 
+0200
+++ new/numactl-2.0.19.13.g63e0223/numa.h       2025-01-28 06:24:03.000000000 
+0100
@@ -140,6 +140,9 @@
 int numa_max_possible_node(void);
 /* Return preferred node */
 int numa_preferred(void);
+/* If the preferred node is unavailable, return an error;
+   otherwise, return the preferred node */
+int numa_preferred_err(void);
 
 /* Return node size and free memory */
 long long numa_node_size64(int node, long long *freep);
@@ -178,6 +181,9 @@
 /* Return the current interleaving mask */
 struct bitmask *numa_get_interleave_mask(void);
 
+/* Return the current weighted interleaving mask */
+struct bitmask *numa_get_weighted_interleave_mask(void);
+
 /* allocate a bitmask big enough for all nodes */
 struct bitmask *numa_allocate_nodemask(void);
 
@@ -223,6 +229,11 @@
 void *numa_alloc_interleaved_subset(size_t size, struct bitmask *nodemask);
 /* Alloc memory page interleaved on all nodes. */
 void *numa_alloc_interleaved(size_t size);
+/* Alloc memory page interleaved on nodes in mask using weights */
+void *numa_alloc_weighted_interleaved_subset(size_t size, struct bitmask 
*nodemask);
+/* Alloc memory page interleaved on all nodes using weights */
+void *numa_alloc_weighted_interleaved(size_t size);
+
 /* Alloc memory located on node */
 void *numa_alloc_onnode(size_t size, int node);
 /* Alloc memory on local node */
@@ -239,6 +250,8 @@
 
 /* Interleave a memory area. */
 void numa_interleave_memory(void *mem, size_t size, struct bitmask *mask);
+/* Interleave a memory area using weights. */
+void numa_weighted_interleave_memory(void *mem, size_t size, struct bitmask 
*mask);
 
 /* Allocate a memory area on a specific node. */
 void numa_tonode_memory(void *start, size_t size, int node);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/numactl-2.0.18.10.g6c14bd5/numactl.c 
new/numactl-2.0.19.13.g63e0223/numactl.c
--- old/numactl-2.0.18.10.g6c14bd5/numactl.c    2024-09-17 15:45:02.000000000 
+0200
+++ new/numactl-2.0.19.13.g63e0223/numactl.c    2025-01-28 06:24:03.000000000 
+0100
@@ -28,6 +28,7 @@
 #include "numaint.h"
 #include "util.h"
 #include "shm.h"
+#include "sysfs.h"
 
 #define CPUSET 0
 #define ALL 1
@@ -143,9 +144,37 @@
        }
 }
 
+static void show_weighted_interleave_weights(void)
+{
+       struct bitmask *weighted_interleave_mask;
+       int maxnode = numa_max_node();
+       const char *sysfs_path = 
"/sys/kernel/mm/mempolicy/weighted_interleave/node%d";
+       char buf[64];
+       int i;
+       char *weight;
+
+       weighted_interleave_mask = numa_get_weighted_interleave_mask();
+       if (!weighted_interleave_mask)
+               return;
+
+       printf("interleaveweights:");
+       for (i = 0; i <= maxnode; i++) {
+               if (numa_bitmask_isbitset(weighted_interleave_mask, i)) {
+                       int w;
+
+                       snprintf(buf, sizeof(buf), sysfs_path, i);
+                       weight = sysfs_read(buf);
+                       if (sscanf(weight, "%d", &w) == 1)
+                               printf(" %d", w);
+               }
+       }
+       printf("\n");
+       numa_bitmask_free(weighted_interleave_mask);
+}
+
 static void show(void)
 {
-       struct bitmask *membind, *interleave, *cpubind, *preferred;
+       struct bitmask *membind, *interleave, *cpubind, *preferred, 
*weighted_interleave;
        unsigned long cur;
        int policy;
 
@@ -159,6 +188,7 @@
 
        preferred = numa_preferred_many();
        interleave = numa_get_interleave_mask();
+       weighted_interleave = numa_get_weighted_interleave_mask();
        membind = numa_get_membind();
        cur = numa_get_interleave_node();
 
@@ -180,6 +210,7 @@
                printf("current\n");
                break;
        case MPOL_INTERLEAVE:
+       case MPOL_WEIGHTED_INTERLEAVE:
                printf("%ld (interleave next)\n",cur);
                break;
        case MPOL_BIND:
@@ -192,13 +223,21 @@
        if (policy == MPOL_INTERLEAVE) {
                printmask("interleavemask", interleave);
                printf("interleavenode: %ld\n", cur);
+       } else if (policy == MPOL_WEIGHTED_INTERLEAVE) {
+               printmask("interleavemask", weighted_interleave);
+               show_weighted_interleave_weights();
+               printf("interleavenode: %ld\n", cur);
        }
        show_physcpubind();
        printmask("cpubind", cpubind);  // for compatibility
        printmask("nodebind", cpubind);
        printmask("membind", membind);
        printmask("preferred", preferred);
+       numa_bitmask_free(cpubind);
+       numa_bitmask_free(membind);
        numa_bitmask_free(preferred);
+       numa_bitmask_free(interleave);
+       numa_bitmask_free(weighted_interleave);
 }
 
 static char *fmt_mem(unsigned long long mem, char *buf)
@@ -737,7 +776,6 @@
        numa_bitmask_free(mask);
 
        av += optind;
-       ac -= optind;
 
        if (shmfd >= 0) {
                if (*av)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/numactl-2.0.18.10.g6c14bd5/numademo.c 
new/numactl-2.0.19.13.g63e0223/numademo.c
--- old/numactl-2.0.18.10.g6c14bd5/numademo.c   2024-09-17 15:45:02.000000000 
+0200
+++ new/numactl-2.0.19.13.g63e0223/numademo.c   2025-01-28 06:24:03.000000000 
+0100
@@ -339,6 +339,7 @@
        memtest("local memory", numa_alloc_local(msize));
 
        memtest("memory interleaved on all nodes", 
numa_alloc_interleaved(msize));
+       memtest("memory weighted interleaved on all nodes", 
numa_alloc_weighted_interleaved(msize));
        for (i = 0; i < numnodes; i++) {
                if (regression_testing && (i % fract_nodes)) {
                /* for regression testing (-t) do only every eighth node */
@@ -374,6 +375,7 @@
                                strcat(buf, buf2);
                        }
                memtest(buf, numa_alloc_interleaved_subset(msize, nodes));
+               memtest(buf, numa_alloc_weighted_interleaved_subset(msize, 
nodes));
 
                if (!numa_has_preferred_many())
                        continue;
@@ -408,6 +410,20 @@
                numa_set_interleave_mask(nodes);
                memtest("manual interleaving on first two nodes", 
numa_alloc(msize));
                printf("current interleave node %d\n", 
numa_get_interleave_node());
+
+       }
+
+       numa_set_weighted_interleave_mask(numa_all_nodes_ptr);
+       memtest("manual interleaving to all nodes", numa_alloc(msize));
+
+       if (numnodes > 0) {
+               numa_bitmask_clearall(nodes);
+               numa_bitmask_setbit(nodes, node_to_use[0]);
+               numa_bitmask_setbit(nodes, node_to_use[1]);
+               numa_set_weighted_interleave_mask(nodes);
+               memtest("manual weighted interleaving on first two nodes", 
numa_alloc(msize));
+               printf("current weighted interleave node %d\n", 
numa_get_interleave_node());
+
        }
 
        numa_bitmask_free(nodes);
@@ -431,12 +447,19 @@
                memtest("memory interleaved on all nodes",
                        numa_alloc_interleaved(msize));
 
+               memtest("memory weighted interleaved on all nodes",
+                       numa_alloc_weighted_interleaved(msize));
+
+
                if (numnodes >= 2) {
                        numa_bitmask_clearall(nodes);
                        numa_bitmask_setbit(nodes, node_to_use[0]);
                        numa_bitmask_setbit(nodes, node_to_use[1]);
                        memtest("memory interleaved on first two nodes",
                                numa_alloc_interleaved_subset(msize, nodes));
+                       memtest("memory weighted interleaved on first two 
nodes",
+                               numa_alloc_weighted_interleaved_subset(msize, 
nodes));
+
                }
 
                for (k = 0; k < numnodes; k++) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/numactl-2.0.18.10.g6c14bd5/stream_lib.c 
new/numactl-2.0.19.13.g63e0223/stream_lib.c
--- old/numactl-2.0.18.10.g6c14bd5/stream_lib.c 2024-09-17 15:45:02.000000000 
+0200
+++ new/numactl-2.0.19.13.g63e0223/stream_lib.c 2025-01-28 06:24:03.000000000 
+0100
@@ -212,7 +212,7 @@
        for (i = 0; i < M; i++) {
                t1 = mysecond();
                while (((t2 = mysecond()) - t1) < 1.0E-6);
-               timesfound[i] = t1 = t2;
+               timesfound[i] = t2;
        }
 
 /*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/numactl-2.0.18.10.g6c14bd5/test/regress 
new/numactl-2.0.19.13.g63e0223/test/regress
--- old/numactl-2.0.18.10.g6c14bd5/test/regress 2024-09-17 15:45:02.000000000 
+0200
+++ new/numactl-2.0.19.13.g63e0223/test/regress 2025-01-28 06:24:03.000000000 
+0100
@@ -65,7 +65,7 @@
 
        # find nodes with at least NEEDPAGES of free memory
        for i in $(seq 0 $maxnode) ; do
-               free=$(numactl --hardware | fgrep " ${nlist[$i]} free" | awk 
'{print $4}')
+               free=$(numactl --hardware | grep -F " ${nlist[$i]} free" | awk 
'{print $4}')
                free=$(( free * MB ))
                if [[ $((free / PAGESIZE)) -ge $NEEDPAGES ]]; then
                        node[$n]=${nlist[$i]}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/numactl-2.0.18.10.g6c14bd5/util.c 
new/numactl-2.0.19.13.g63e0223/util.c
--- old/numactl-2.0.18.10.g6c14bd5/util.c       2024-09-17 15:45:02.000000000 
+0200
+++ new/numactl-2.0.19.13.g63e0223/util.c       2025-01-28 06:24:03.000000000 
+0100
@@ -92,10 +92,11 @@
        { "membind",    MPOL_BIND, },
        { "preferred",   MPOL_PREFERRED, },
        { "default",    MPOL_DEFAULT, 1 },
+       { "weighted-interleave", MPOL_WEIGHTED_INTERLEAVE, },
        { NULL },
 };
 
-static char *policy_names[] = { "default", "preferred", "bind", "interleave", 
"local", "preferred-many" };
+static char *policy_names[] = { "default", "preferred", "bind", "interleave", 
"local", "preferred-many", "weighted-interleave" };
 
 char *policy_name(int policy)
 {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/numactl-2.0.18.10.g6c14bd5/versions.ldscript 
new/numactl-2.0.19.13.g63e0223/versions.ldscript
--- old/numactl-2.0.18.10.g6c14bd5/versions.ldscript    2024-09-17 
15:45:02.000000000 +0200
+++ new/numactl-2.0.19.13.g63e0223/versions.ldscript    2025-01-28 
06:24:03.000000000 +0100
@@ -45,6 +45,7 @@
     numa_parse_bitmap;
     numa_police_memory;
     numa_preferred;
+    numa_preferred_err;
     numa_run_on_node;
     numa_run_on_node_mask;
     numa_sched_getaffinity;
@@ -176,6 +177,10 @@
 libnuma_2.1{
   global:
     numa_set_weighted_interleave_mask;
+    numa_get_weighted_interleave_mask;
+    numa_alloc_weighted_interleaved;
+    numa_alloc_weighted_interleaved_subset;
+    numa_weighted_interleave_memory;
   local:
     *;
 } libnuma_1.7;

++++++ numactl.obsinfo ++++++
--- /var/tmp/diff_new_pack.qDj0pT/_old  2025-04-15 16:48:13.764941338 +0200
+++ /var/tmp/diff_new_pack.qDj0pT/_new  2025-04-15 16:48:13.768941506 +0200
@@ -1,5 +1,5 @@
 name: numactl
-version: 2.0.18.10.g6c14bd5
-mtime: 1726580702
-commit: 6c14bd59d438ebb5ef828e393e8563ba18f59cb2
+version: 2.0.19.13.g63e0223
+mtime: 1738041843
+commit: 63e02235bdbcf5aa334903be2111a82b27c8c155
 

Reply via email to