lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 11 Mar 2015 18:37:06 +0530
From:	Madhavan Srinivasan <maddy@...ux.vnet.ibm.com>
To:	mpe@...erman.id.au, benh@...nel.crashing.org, paulus@...ba.org
Cc:	linux-kernel@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
	linuxppc-dev@...abs.org, eranian@...gle.com, ak@...ux.intel.com,
	srivatsa@....edu, Madhavan Srinivasan <maddy@...ux.vnet.ibm.com>
Subject: [RFC PATCH 0/7] powerpc/powernv: Nest Instrumentation support 

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@...tul57a-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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ