]> git.baikalelectronics.ru Git - kernel.git/commit
perf affinity: Add infrastructure to save/restore affinity
authorAndi Kleen <ak@linux.intel.com>
Thu, 21 Nov 2019 00:15:12 +0000 (16:15 -0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 28 Nov 2019 11:08:38 +0000 (08:08 -0300)
commit2244c066f3f096bb8c30f567b3a52edd649d6717
tree782480a707963311c56467d4056f63bea7362ab8
parent4cc49b4849c55aa4a1af3eb7ffc707e4bc0a7db1
perf affinity: Add infrastructure to save/restore affinity

The kernel perf subsystem has to IPI to the target CPU for many
operations. On systems with many CPUs and when managing many events the
overhead can be dominated by lots of IPIs.

An alternative is to set up CPU affinity in the perf tool, then set up
all the events for that CPU, and then move on to the next CPU.

Add some affinity management infrastructure to enable such a model.
Used in followon patches.

Committer notes:

Use zfree() in some places, add missing stdbool.h header, some minor
coding style changes.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Link: http://lore.kernel.org/lkml/20191121001522.180827-3-andi@firstfloor.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/Build
tools/perf/util/affinity.c [new file with mode: 0644]
tools/perf/util/affinity.h [new file with mode: 0644]
tools/perf/util/python-ext-sources