[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <96c7776f-1f17-a39e-23e9-658596216d6b@linux.intel.com>
Date: Wed, 2 Aug 2017 11:11:23 +0300
From: Alexey Budankov <alexey.budankov@...ux.intel.com>
To: Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Cc: Andi Kleen <ak@...ux.intel.com>, Kan Liang <kan.liang@...el.com>,
Dmitri Prokhorov <Dmitry.Prohorov@...el.com>,
Valery Cherepennikov <valery.cherepennikov@...el.com>,
Mark Rutland <mark.rutland@....com>,
Stephane Eranian <eranian@...gle.com>,
David Carrillo-Cisneros <davidcc@...gle.com>,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: [PATCH v6 0/3] perf/core: addressing 4x slowdown during per-process
profiling of STREAM benchmark on Intel Xeon Phi
Hi,
By default, the userspace perf tool opens per-cpu task-bound events
when sampling, so for N logical events requested by the user, the tool
will open N * NR_CPUS events.
In the kernel, we mux events with a hrtimer, periodically rotating the
flexible group list and trying to schedule each group in turn. We skip
groups whose cpu filter doesn't match. So when we get unlucky, we can
walk N * (NR_CPUS - 1) groups pointlessly for each hrtimer invocation.
This has been observed to result in significant overhead when running
the STREAM benchmark on 272 core Xeon Phi systems.
One way to avoid this is to place our events into an rb tree sorted by
CPU, so that our hrtimer can skip to the current CPU's list and ignore
everything else.
This patch set moves event groups into rb trees and implements
skipping to the current CPU's list on hrtimer interrupt.
The patch set was tested on Xeon Phi using perf_fuzzer and tests
from here: https://github.com/deater/perf_event_tests
Patches in the set are expected to be applied one after another in
the mentioned order and they are logically split here into three parts
to simplify the review process.
Thanks,
Alexey
---
Alexey Budankov (3):
perf/core: use rb trees for pinned/flexible groups
perf/core: use context tstamp_data for skipped events on mux interrupt
perf/core: add mux switch to skip to the current CPU's events list on mux interrupt
include/linux/perf_event.h | 54 +++--
kernel/events/core.c | 584 +++++++++++++++++++++++++++++++++------------
2 files changed, 473 insertions(+), 165 deletions(-)
Powered by blists - more mailing lists