SHA256
1
0
forked from pool/numactl

Accepting request 26681 from Base:System

Copy from Base:System/numactl based on submit request 26681 from user msmeissn

OBS-URL: https://build.opensuse.org/request/show/26681
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/numactl?expand=0&rev=20
This commit is contained in:
OBS User autobuild 2009-12-16 15:11:37 +00:00 committed by Git OBS Bridge
parent 5521e1394d
commit 6af22d4443
7 changed files with 32 additions and 90 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:38fd58b669ce2b667b53c8372e8d052d99224c25689871cb315ccdb0b6772245
size 57394

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:41a1809e79c4381745e11dafb19a3a1f2c62a9a3e60f374594d935a5aba6f708
size 66851

View File

@ -1,19 +0,0 @@
Index: numactl-2.0.3-rc1/Makefile
===================================================================
--- numactl-2.0.3-rc1.orig/Makefile
+++ numactl-2.0.3-rc1/Makefile
@@ -57,13 +57,13 @@ memhog: util.o memhog.o libnuma.so
numactl.o: numactl.c
-numademo: override LDFLAGS += -lm
# GNU make 3.80 appends BENCH_CFLAGS twice. Bug? It's harmless though.
numademo: CFLAGS += -DHAVE_STREAM_LIB -DHAVE_MT -DHAVE_CLEAR_CACHE ${BENCH_CFLAGS}
stream_lib.o: CFLAGS += ${BENCH_CFLAGS}
mt.o: CFLAGS += ${BENCH_CFLAGS}
mt.o: mt.c
numademo: numademo.o stream_lib.o mt.o libnuma.so clearcache.o
+ ${CC} ${LDFLAGS} -o $@ $^ -L. -lm -lnuma
test_numademo: numademo
LD_LIBRARY_PATH=$$(pwd) ./numademo -t -e 10M

View File

@ -1,61 +0,0 @@
From: Arnd Bergmann <arnd@arndb.de>
To: Cliff Wickman <cpw@sgi.com>
Subject: [PATCH] fix output of numactl --hardware with >BITS_PER_LONG cpus
Date: Wed, 28 Jan 2009 17:41:16 +0100
Cc: linux-numa@vger.kernel.org,
hannsj_uhl@de.ibm.com,
wmb@us.ibm.com
There was evidently a glitch in the conversion of numactl to libnuma2:
The print_node_cpus function tries to find the size of the bitmask,
which it no longer needs to. This results in printing only the
first word of the CPU mask.
This fixes the function to print all available CPUs again.
Found by Bill Buros on a 128-way 64 bit system.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
numactl.c | 24 ++++++------------------
1 file changed, 6 insertions(+), 18 deletions(-)
--- a/numactl.c
+++ b/numactl.c
@@ -199,28 +199,16 @@ static void print_distances(int maxnode)
void print_node_cpus(int node)
{
- int len = 1;
int conf_cpus = numa_num_configured_cpus();
+ int i, err;
+ struct bitmask *cpus;
- for (;;) {
- int i, err;
- struct bitmask *cpus;
-
- cpus = numa_bitmask_alloc(conf_cpus);
- errno = 0;
- err = numa_node_to_cpus(node, cpus);
- if (err < 0) {
- if (errno == ERANGE) {
- len *= 2;
- continue;
- }
- break;
- }
- for (i = 0; i < len*BITS_PER_LONG; i++)
+ cpus = numa_bitmask_alloc(conf_cpus);
+ err = numa_node_to_cpus(node, cpus);
+ if (err >= 0)
+ for (i = 0; i < conf_cpus; i++)
if (numa_bitmask_isbitset(cpus, i))
printf(" %d", i);
- break;
- }
putchar('\n');
}

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Dec 11 14:18:35 CET 2009 - trenn@suse.de
- Update to version 2.0.4-rc1
- Added missing manpages: numastat, migspeed, migratepages
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Dec 10 13:36:45 CET 2009 - meissner@suse.de Thu Dec 10 13:36:45 CET 2009 - meissner@suse.de

View File

@ -1,5 +1,5 @@
# #
# spec file for package numactl (Version 2.0.2_2.0.3rc1) # spec file for package numactl (Version 2.0.4.rc1)
# #
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
# #
@ -22,9 +22,9 @@ Url: http://oss.sgi.com/projects/libnuma/
Name: numactl Name: numactl
License: GPLv2 ; GPLv2+ License: GPLv2 ; GPLv2+
Summary: NUMA Policy Control Summary: NUMA Policy Control
Version: 2.0.2_2.0.3rc1 Version: 2.0.4.rc1
Release: 5 Release: 1
%define origversion 2.0.3-rc1 %define origversion 2.0.4-rc1
AutoReqProv: on AutoReqProv: on
# bug437293 # bug437293
%ifarch ppc64 %ifarch ppc64
@ -32,8 +32,7 @@ Obsoletes: numactl-64bit
%endif %endif
# #
Source: numactl-%{origversion}.tar.bz2 Source: numactl-%{origversion}.tar.bz2
Patch0: numactl-hardware-bits_per_long_cpus.diff Patch0: numactl_install_all_manpages
Patch1: numactl-fixasneeded.patch
Group: System/Management Group: System/Management
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExclusiveArch: ia64 x86_64 ppc64 ppc ExclusiveArch: ia64 x86_64 ppc64 ppc
@ -88,7 +87,6 @@ Authors:
%prep %prep
%setup -n %{name}-%{origversion} %setup -n %{name}-%{origversion}
%patch0 -p1 %patch0 -p1
%patch1 -p1
%build %build
make CFLAGS="${RPM_OPT_FLAGS}" make CFLAGS="${RPM_OPT_FLAGS}"

View File

@ -0,0 +1,18 @@
---
Makefile | 3 +++
1 file changed, 3 insertions(+)
Index: numactl-2.0.4-rc1/Makefile
===================================================================
--- numactl-2.0.4-rc1.orig/Makefile
+++ numactl-2.0.4-rc1/Makefile
@@ -135,6 +135,9 @@ install: numactl migratepages migspeed n
install -m 0755 memhog ${prefix}/bin
mkdir -p ${prefix}/share/man/man2 ${prefix}/share/man/man8 ${prefix}/share/man/man3
install -m 0644 numactl.8 ${prefix}/share/man/man8
+ install -m 0644 numastat.8 ${prefix}/share/man/man8
+ install -m 0644 migratepages.8 ${prefix}/share/man/man8
+ install -m 0644 migspeed.8 ${prefix}/share/man/man8
install -m 0644 numa.3 ${prefix}/share/man/man3
( cd ${prefix}/share/man/man3 ; for i in $$(./manlinks) ; do ln -sf numa.3 $$i.3 ; done )
mkdir -p ${libdir}