[00/10] perf: Multi-die/package support
mbox series

Message ID 1550606411-5313-1-git-send-email-kan.liang@linux.intel.com
Headers show
Series
  • perf: Multi-die/package support
Related show

Message

Liang, Kan Feb. 19, 2019, 8 p.m. UTC
From: Kan Liang <kan.liang@linux.intel.com>

Add Linux perf support for multi-die/package. The first product with
multi-die is Xeon Cascade Lake-AP (CLX-AP).
The code bases on the top of Len's multi-die/package support.
https://lkml.org/lkml/2019/2/18/1534

Patch 1-4: They are generic codes for previous platforms.
Perf supports miscellaneous modules, e.g cstate, RAPL and uncore.
Their counters have the same scope of effect (per package).
But they maintain their own scope information independently.
It's very useful to abstract several common topology related codes
for these modules to reduce the code redundancy, especially when
adding counters with new scope.

Patch 5-8: Support die scope counters on CLX-AP for uncore, RAPL
and cstate.

Patch 9-10: Support per-die aggregation for perf stat and header.

Kan Liang (10):
  perf/x86/intel: Introduce a concept "domain" as the scope of counters
  perf/x86/intel/cstate: Apply "domain" for cstate
  perf/x86/intel/uncore: Apply "domain" for uncore
  perf/x86/intel/rapl: Apply "domain" for RAPL
  perf/x86/intel/domain: Add new domain type for die
  perf/x86/intel/uncore: Support die scope counters on CLX-AP
  perf/x86/intel/rapl: Support die scope counters on CLX-AP
  perf/x86/intel/cstate: Support die scope counters on CLX-AP
  perf header: Add die information in cpu topology
  perf stat: Support per-die aggregation

 arch/x86/events/Makefile                           |   2 +-
 arch/x86/events/domain.c                           |  81 +++++
 arch/x86/events/domain.h                           |  26 ++
 arch/x86/events/intel/cstate.c                     | 364 ++++++++++++---------
 arch/x86/events/intel/rapl.c                       | 333 ++++++++++++++-----
 arch/x86/events/intel/uncore.c                     | 247 +++++++++-----
 arch/x86/events/intel/uncore.h                     |   9 +-
 arch/x86/events/intel/uncore_snbep.c               |   2 +-
 tools/perf/Documentation/perf-stat.txt             |  10 +
 tools/perf/Documentation/perf.data-file-format.txt |   9 +-
 tools/perf/builtin-stat.c                          |  73 ++++-
 tools/perf/util/cpumap.c                           |  55 +++-
 tools/perf/util/cpumap.h                           |  10 +-
 tools/perf/util/env.c                              |   1 +
 tools/perf/util/env.h                              |   3 +
 tools/perf/util/header.c                           | 185 ++++++++++-
 tools/perf/util/stat-display.c                     |  24 +-
 tools/perf/util/stat-shadow.c                      |   1 +
 tools/perf/util/stat.c                             |   1 +
 tools/perf/util/stat.h                             |   1 +
 20 files changed, 1082 insertions(+), 355 deletions(-)
 create mode 100644 arch/x86/events/domain.c
 create mode 100644 arch/x86/events/domain.h

Comments

Peter Zijlstra Feb. 20, 2019, 10:15 a.m. UTC | #1
On Tue, Feb 19, 2019 at 12:00:01PM -0800, kan.liang@linux.intel.com wrote:
> From: Kan Liang <kan.liang@linux.intel.com>
> 
> Add Linux perf support for multi-die/package. The first product with
> multi-die is Xeon Cascade Lake-AP (CLX-AP).
> The code bases on the top of Len's multi-die/package support.
> https://lkml.org/lkml/2019/2/18/1534

*sigh*, don't use lkml.org links.

We have a perfectly good canonical form:

  https://lkml.kernel.org/r/20190219034013.4147-1-lenb@kernel.org

which has the added benefit of including the Message-Id such that I can
easily find the email in my local archive.

And since Len forgot to Cc me on those, I suppose I'll have to go dig
them out to make sense of these here patches.
Jiri Olsa Feb. 20, 2019, 12:46 p.m. UTC | #2
On Tue, Feb 19, 2019 at 12:00:01PM -0800, kan.liang@linux.intel.com wrote:
> From: Kan Liang <kan.liang@linux.intel.com>
> 
> Add Linux perf support for multi-die/package. The first product with
> multi-die is Xeon Cascade Lake-AP (CLX-AP).
> The code bases on the top of Len's multi-die/package support.
> https://lkml.org/lkml/2019/2/18/1534
> 
> Patch 1-4: They are generic codes for previous platforms.
> Perf supports miscellaneous modules, e.g cstate, RAPL and uncore.
> Their counters have the same scope of effect (per package).
> But they maintain their own scope information independently.
> It's very useful to abstract several common topology related codes
> for these modules to reduce the code redundancy, especially when
> adding counters with new scope.
> 
> Patch 5-8: Support die scope counters on CLX-AP for uncore, RAPL
> and cstate.
> 
> Patch 9-10: Support per-die aggregation for perf stat and header.
> 
> Kan Liang (10):
>   perf/x86/intel: Introduce a concept "domain" as the scope of counters
>   perf/x86/intel/cstate: Apply "domain" for cstate
>   perf/x86/intel/uncore: Apply "domain" for uncore
>   perf/x86/intel/rapl: Apply "domain" for RAPL
>   perf/x86/intel/domain: Add new domain type for die
>   perf/x86/intel/uncore: Support die scope counters on CLX-AP
>   perf/x86/intel/rapl: Support die scope counters on CLX-AP
>   perf/x86/intel/cstate: Support die scope counters on CLX-AP
>   perf header: Add die information in cpu topology
>   perf stat: Support per-die aggregation

hi,
what is based on? I'm getting conflicts when applying
on tip or Arnaldo's perf/core

thanks,
jirka

> 
>  arch/x86/events/Makefile                           |   2 +-
>  arch/x86/events/domain.c                           |  81 +++++
>  arch/x86/events/domain.h                           |  26 ++
>  arch/x86/events/intel/cstate.c                     | 364 ++++++++++++---------
>  arch/x86/events/intel/rapl.c                       | 333 ++++++++++++++-----
>  arch/x86/events/intel/uncore.c                     | 247 +++++++++-----
>  arch/x86/events/intel/uncore.h                     |   9 +-
>  arch/x86/events/intel/uncore_snbep.c               |   2 +-
>  tools/perf/Documentation/perf-stat.txt             |  10 +
>  tools/perf/Documentation/perf.data-file-format.txt |   9 +-
>  tools/perf/builtin-stat.c                          |  73 ++++-
>  tools/perf/util/cpumap.c                           |  55 +++-
>  tools/perf/util/cpumap.h                           |  10 +-
>  tools/perf/util/env.c                              |   1 +
>  tools/perf/util/env.h                              |   3 +
>  tools/perf/util/header.c                           | 185 ++++++++++-
>  tools/perf/util/stat-display.c                     |  24 +-
>  tools/perf/util/stat-shadow.c                      |   1 +
>  tools/perf/util/stat.c                             |   1 +
>  tools/perf/util/stat.h                             |   1 +
>  20 files changed, 1082 insertions(+), 355 deletions(-)
>  create mode 100644 arch/x86/events/domain.c
>  create mode 100644 arch/x86/events/domain.h
> 
> -- 
> 2.7.4
>
Peter Zijlstra Feb. 20, 2019, 1:24 p.m. UTC | #3
On Wed, Feb 20, 2019 at 01:46:19PM +0100, Jiri Olsa wrote:
> On Tue, Feb 19, 2019 at 12:00:01PM -0800, kan.liang@linux.intel.com wrote:

> > The code bases on the top of Len's multi-die/package support.
> > https://lkml.org/lkml/2019/2/18/1534

> what is based on? I'm getting conflicts when applying
> on tip or Arnaldo's perf/core
Jiri Olsa Feb. 20, 2019, 1:32 p.m. UTC | #4
On Wed, Feb 20, 2019 at 02:24:13PM +0100, Peter Zijlstra wrote:
> On Wed, Feb 20, 2019 at 01:46:19PM +0100, Jiri Olsa wrote:
> > On Tue, Feb 19, 2019 at 12:00:01PM -0800, kan.liang@linux.intel.com wrote:
> 
> > > The code bases on the top of Len's multi-die/package support.
> > > https://lkml.org/lkml/2019/2/18/1534
> 
> > what is based on? I'm getting conflicts when applying
> > on tip or Arnaldo's perf/core

ugh, thanks ;-)

jirka