LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [RFC PATCH 0/7] powerpc/powernv: Nest Instrumentation support 
@ 2015-03-11 13:07 Madhavan Srinivasan
  2015-03-11 13:07 ` [RFC PATCH 1/7] powerpc/powernv: Data structure and macros definition Madhavan Srinivasan
                   ` (6 more replies)
  0 siblings, 7 replies; 10+ messages in thread
From: Madhavan Srinivasan @ 2015-03-11 13:07 UTC (permalink / raw)
  To: mpe, benh, paulus
  Cc: linux-kernel, linuxppc-dev, linuxppc-dev, eranian, ak, srivatsa,
	Madhavan Srinivasan

This patchset enables Nest Instrumentation support on powerpc.
POWER8 has per-chip Nest Intrumentation which provides various 
per-chip utilisation metrics like memory bandwidth, IO bandwidth 
and many other component metrics.

Nest Instrumentation provides an interface (via PORE Engine)
to configure and move the nest counter data to memory. From
kernel side, OPAL Call interface is used to activate/deactivate
PORE Engine for nest data collection.

OPAL at boot, detects the feature, initializes it and pass on
the nest units and other related information such as memory
region, events supported so on, to kernel via device-tree. 

Patchset uses Intel's uncore framework to enable the consumption 
of Nest instrumentation data on powerpc. First three patches are
derived from arch/x86/kernel/cpu/perf_event_intel_uncore.[c/h].
But patches differ since "box" level abstration is not implemented
As a TODO, need to rework the code to reduce code duplication. 

Fourth patch in the series adds the OPAL call interface to kernel.
Fifth patch defines a generic pmu functions to be shared by all
nest pmu units. And sixth patch defines the Device-tree parsing
functions to populate various structures to aid the pmu registration.
Patch also explains the device-tree layout for nest counter units.

Here is sample perf usage to explain the interface and
values represeneted here are bogus, since platform enablement is
under-developement.

# ./perf list
....
  uncore_mcs_0/mcs_read/                             [Kernel PMU event]
  uncore_mcs_0/mcs_write/                            [Kernel PMU event]
  uncore_mcs_1/mcs_read/                             [Kernel PMU event]
  uncore_mcs_1/mcs_write/                            [Kernel PMU event]
  uncore_mcs_2/mcs_read/                             [Kernel PMU event]
  uncore_mcs_2/mcs_write/                            [Kernel PMU event]
  uncore_mcs_3/mcs_read/                             [Kernel PMU event]
  uncore_mcs_3/mcs_write/                            [Kernel PMU event]
...

[root@ltctul57a-p1 perf]# ./perf stat -e 'uncore_mcs_0/mcs_read/' -e 'uncore_mcs_0/mcs_write/' -a sleep 1

 Performance counter stats for 'system wide':

              64.00 MiB/s	 uncore_mcs_0/mcs_read/                                       [100.00%]
              64.00 MiB/s	 uncore_mcs_0/mcs_write/                                     

       1.000723515 seconds time elapsed

Kindly let me know you comments and feedback.

Madhavan Srinivasan (7):
  powerpc/powernv: Data structure and macros definition 
  powerpc/powernv: uncore foundation code
  powerpc/powernv: uncore cpumask and CPU hotplug
  powerpc/powernv: Add OPAL support for uncore pmu
  powerpc/powernv: Add POWER8 uncore pmu support
  powerpc/powernv: add support to parse dt for uncore pmu
  powerpc/powernv: enable uncore related file in Makefile

 arch/powerpc/include/asm/opal.h                |   3 +
 arch/powerpc/perf/Makefile                     |   2 +-
 arch/powerpc/perf/uncore_pmu.c                 | 260 ++++++++++++++++
 arch/powerpc/perf/uncore_pmu.h                 |  89 ++++++
 arch/powerpc/perf/uncore_pmu_p8.c              | 403 +++++++++++++++++++++++++
 arch/powerpc/platforms/powernv/opal-wrappers.S |   1 +
 6 files changed, 757 insertions(+), 1 deletion(-)
 create mode 100644 arch/powerpc/perf/uncore_pmu.c
 create mode 100644 arch/powerpc/perf/uncore_pmu.h
 create mode 100644 arch/powerpc/perf/uncore_pmu_p8.c

-- 
1.9.1


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

end of thread, other threads:[~2015-03-12  8:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-11 13:07 [RFC PATCH 0/7] powerpc/powernv: Nest Instrumentation support Madhavan Srinivasan
2015-03-11 13:07 ` [RFC PATCH 1/7] powerpc/powernv: Data structure and macros definition Madhavan Srinivasan
2015-03-11 13:07 ` [RFC PATCH 2/7] powerpc/powernv: uncore foundation code Madhavan Srinivasan
2015-03-11 13:07 ` [RFC PATCH 3/7] powerpc/powernv: uncore cpumask and CPU hotplug Madhavan Srinivasan
2015-03-11 13:07 ` [RFC PATCH 4/7]powerpc/powernv: Add OPAL support for Nest pmu Madhavan Srinivasan
2015-03-11 22:57   ` Stewart Smith
2015-03-12  8:47     ` maddy
2015-03-11 13:07 ` [RFC PATCH 5/7]powerpc/powernv: Add POWER8 specific nest pmu support Madhavan Srinivasan
2015-03-11 13:07 ` [RFC PATCH 6/7]powerpc/powernv: add support to parse dt for nest pmu Madhavan Srinivasan
2015-03-11 13:07 ` [RFC PATCH 7/7]powerpc/powernv: enable nest pmu related file in Makefile Madhavan Srinivasan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).