lkml.org 
[lkml]   [2017]   [Aug]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH v6 0/3] perf/core: addressing 4x slowdown during per-process profiling of STREAM benchmark on Intel Xeon Phi
Date
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(-)


\
 
 \ /
  Last update: 2017-08-02 10:13    [W:0.257 / U:37.236 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site