Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1363713
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 04/23] perf bench numa: Fix assertion for nodes bitfield |
| Date | 2016-03-23 22:30 +0100 |
| Message-ID | <rfYvM-Xc-15@gated-at.bofh.it> (permalink) |
| References | <rfYm5-S2-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Jakub Jelen <jakuje@gmail.com>
Comparing bits and bytes in numa benchmark assertion
I hit the issue on two socket Power8 machine presenting its numa nodes
as 0,1,16,17 (according to numactl). Therefore I got error (and hang of
parent process):
perf: bench/numa.c:296: bind_to_memnode: Assertion `!(g->p.nr_nodes > (int)sizeof(nodemask))' failed.
This is obviously false positive. We can fit all the 18 nodes into
bitfield of 8 bytes (long on 64b architecture).
Signed-off-by: Jakub Jelen <jakuje@gmail.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jakub Jelen <jjelen@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: trivial@kernel.org
Link: http://lkml.kernel.org/r/1458388687-24421-1-git-send-email-jakuje@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/bench/numa.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/bench/numa.c b/tools/perf/bench/numa.c
index 5049d6357a46..7500d959d7eb 100644
--- a/tools/perf/bench/numa.c
+++ b/tools/perf/bench/numa.c
@@ -293,7 +293,7 @@ static void bind_to_memnode(int node)
if (node == -1)
return;
- BUG_ON(g->p.nr_nodes > (int)sizeof(nodemask));
+ BUG_ON(g->p.nr_nodes > (int)sizeof(nodemask)*8);
nodemask = 1L << node;
ret = set_mempolicy(MPOL_BIND, &nodemask, sizeof(nodemask)*8);
--
2.5.5
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[GIT PULL 00/23] perf/core improvements and fixes Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:20 +0100 [PATCH 03/23] perf symbols: Record text offset in dso to calculate objdump address Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:20 +0100 [PATCH 06/23] perf tools: Remove misplaced __maybe_unused Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100 [PATCH 17/23] perf tools: Do not include stringify.h from the kernel sources Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100 [PATCH 04/23] perf bench numa: Fix assertion for nodes bitfield Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100 [PATCH 13/23] perf tools: Simplify die() mechanism Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100 [PATCH 10/23] perf thread: Rename perf_event__preprocess_sample_addr to thread__resolve Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100 [PATCH 14/23] perf tools: Remove needless 'extern' from function prototypes Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100 [PATCH 07/23] perf tests: Forward the perf_sample in the dwarf unwind test Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100 [PATCH 18/23] perf tools: Remove unused perf_pathdup, xstrdup functions Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100 [PATCH 12/23] perf tools: Remove unused DIE_IF macro Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100 [PATCH 01/23] perf test: Remove 'core_id' check in topo test Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100 [PATCH 11/23] perf script: Remove lots of unused arguments Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100 [PATCH 15/23] tools lib traceevent: Remove redundant CPU output Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100 [PATCH 02/23] tools: Move utilities.mak from perf to tools/scripts/ Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100 [PATCH 09/23] perf machine: Rename perf_event__preprocess_sample to machine__resolve Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100 [PATCH 19/23] perf help: Use asprintf instead of adhoc equivalents Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100 [PATCH 20/23] perf probe: No need to use formatting strbuf method Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100 Re: [GIT PULL 00/23] perf/core improvements and fixes Ingo Molnar <mingo@kernel.org> - 2016-03-24 08:40 +0100
csiph-web