All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/7] Perf core cleanups for shared perf_event_contexts
@ 2014-02-10 17:44 Mark Rutland
  2014-02-10 17:44 ` [PATCH 1/7] perf: fix prototype of find_pmu_context Mark Rutland
                   ` (7 more replies)
  0 siblings, 8 replies; 26+ messages in thread
From: Mark Rutland @ 2014-02-10 17:44 UTC (permalink / raw)
  To: linux-kernel; +Cc: will.deacon, dave.martin, Mark Rutland

Hi,

I've been working on adding support for heterogeneous pmus (as would be found
in big.LITTLE systems) to the arm perf backend, and in the process of doing so
I've noticed a few issues in the core perf code that would be nice to have
fixed up. The heterogeneous pmu support is not quite ready, but the core
changes are independent, so I'm posting them today.

The first three patches fix up some basic issues which are relevant regardless
of whether you wish to deal with heterogeneous pmus, though patch two also
fixes a potential bug when perf_event_contexts are shared by multiple pmus.

The remaining four patches attempt to fix some inconsistencies in perf core
with regard to multiple pmus sharing perf_event_contexts, taken to the extreme
of removing perf_event_context::pmu. These result in an odd edge-case with a
shared hrtimer_interval_ms being exported per-pmu, and also highlight how odd
it is to have a group of events from multiple pmus (given that should mean the
group can never be scheduled).

Based on commit 443772776c69 (perf: Disable all pmus on unthrottling and
rescheduling) I believe that pmus sharing a context is the expected behaviour,
but given the edge cases this series highlights I think it would make more
sense to disallow context sharing and allocate a unique context per-pmu instead
(which would also make ctx->pmu sane again). I'm happy to rework the series to
that effect if people agree with the approach.

Patch 4 of this series (be less pessimistic when scheduling events) can be
improved with some standardisation of error codes returned by pmu::add, but for
the moment I've kept myself away from the architecture backends.

The current heterogeneous pmu series based atop of this can be found on my
linux-arm git repo [1].

Patches are based on v3.14-rc1.

Thanks,
Mark.

[1] git://linux-arm.org/linux-mr.git devel/perf/multi-pmu

Mark Rutland (7):
  perf: fix prototype of find_pmu_context
  perf: remove redundant pmu assignment
  perf: kill perf_event_context_type
  perf: be less pessimistic when scheduling events
  perf: kill pmu::hrtimer_interval_ms
  perf: Centralise context pmu disabling
  perf: kill perf_event_context::pmu

 include/linux/perf_event.h |  10 +--
 kernel/events/core.c       | 162 +++++++++++++++++++++++----------------------
 2 files changed, 85 insertions(+), 87 deletions(-)

-- 
1.8.1.1


^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2014-02-27 13:34 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-10 17:44 [PATCH 0/7] Perf core cleanups for shared perf_event_contexts Mark Rutland
2014-02-10 17:44 ` [PATCH 1/7] perf: fix prototype of find_pmu_context Mark Rutland
2014-02-27 13:33   ` [tip:perf/core] perf: Fix prototype of find_pmu_context() tip-bot for Mark Rutland
2014-02-10 17:44 ` [PATCH 2/7] perf: remove redundant pmu assignment Mark Rutland
2014-02-27 13:33   ` [tip:perf/core] perf: Remove redundant PMU assignment tip-bot for Mark Rutland
2014-02-10 17:44 ` [PATCH 3/7] perf: kill perf_event_context_type Mark Rutland
2014-02-25 11:38   ` Peter Zijlstra
2014-02-27 11:46     ` Mark Rutland
2014-02-10 17:44 ` [PATCH 4/7] perf: be less pessimistic when scheduling events Mark Rutland
2014-02-10 17:58   ` Peter Zijlstra
2014-02-11 17:48     ` Mark Rutland
2014-02-25 11:29       ` Peter Zijlstra
2014-02-27 12:07         ` Mark Rutland
2014-02-10 17:44 ` [PATCH 5/7] perf: kill pmu::hrtimer_interval_ms Mark Rutland
2014-02-10 17:44 ` [PATCH 6/7] perf: Centralise context pmu disabling Mark Rutland
2014-02-10 18:08   ` Peter Zijlstra
2014-02-10 17:44 ` [PATCH 7/7] perf: kill perf_event_context::pmu Mark Rutland
2014-02-10 18:10   ` Peter Zijlstra
2014-02-11 17:56     ` Mark Rutland
2014-02-12 15:01       ` Dave Martin
2014-02-25 11:31       ` Peter Zijlstra
2014-02-27 11:48         ` Mark Rutland
2014-02-27 11:51           ` Peter Zijlstra
2014-02-27 12:30             ` Mark Rutland
2014-02-19 13:43 ` [PATCH 0/7] Perf core cleanups for shared perf_event_contexts Mark Rutland
2014-02-25 11:39   ` Peter Zijlstra

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.