perf bench numa: Fix immediate meeting of convergence condition
authorPetr Holasek <pholasek@redhat.com>
Thu, 16 Apr 2015 15:38:19 +0000 (17:38 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 27 Apr 2015 16:57:50 +0000 (13:57 -0300)
commit1d90a685eb75a56648d7dd22c704a1a6da516de9
tree68ccf9ddc212ca9304f8f5d4fdc5997dc98debe5
parent24f1ced167e5e011040b4c3aae75aee45a79eed5
perf bench numa: Fix immediate meeting of convergence condition

This patch fixes the race in the beginning of benchmark run when some
threads hasn't got assigned curr_cpu yet so they don't occur in
nodes-of-process stats and benchmark concludes that all remaining
threads are converged already.

The race can be reproduced with small amount of threads and some bigger
amount of shared process memory, e.g. one process, two threads and 5GB
of process memory.

Signed-off-by: Petr Holasek <pholasek@redhat.com>
Reviewed-by: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/r/1429198699-25039-4-git-send-email-pholasek@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/bench/numa.c