Skip to content

RFC perf: Add Intel Nehalem uncore pmu support

Lin Ming lkml 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 RFC Latest3 patches 30 repliesIn review
  2. v2 RFC3 patches 41 repliesSuperseded
  3. v13 patches 9 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3perf: add counter bits argument for x86_perf_event_updatearch/x86/kernel/cpu/perf_event.c arch/x86/kernel/cpu/perf_event_intel.c arch/x86/kernel/cpu/perf_event_p4.c+9 -90 replies
2/3perf: Implement Nehalem uncore pmuarch/x86/include/asm/msr-index.h arch/x86/include/asm/perf_event.h arch/x86/kernel/cpu/Makefile +4 more+621 -525 replies
3/3perf: Update perf tool to monitor uncore eventstools/perf/util/parse-events.c+10 -45 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [RFC PATCH 0/3 v3] perf: Add Intel Nehalem uncore pmu support

Hi, all

Here are the v3 patches to add uncore pmu support to perf, applied on top of current tip/master(74f6deb).

Changelogs of v3:

- Allocate uncore data with kmalloc_node, like AMD NB stuff. (Peter Zijlstra)

- per-task uncore event is not allowed. Simply set pmu::task_ctx_nr = perf_invalid_context. (Peter Zijlstra)

- Route interrupts to the first core that accesses uncore pmu. (Stephane Eranian)

- Check CPUID signatures with boot_cpu_data. (Andi Kleen)

- Remove unneeded include files. (Andi Kleen)

Changelogs of v2:

- modify the NMI handling code to handle all counters enabled by all 4 cores.

- allocate uncore_events[] table dynamically using kmalloc_node() to avoid unnecessary remote memory accesses. (Stephane Eranian)

- add support for the fixed uncore counter. (Stephane Eranian)

- Handling of exclude_* bits. Uncore PMU measures at all privilege level all the time. So it doesn't make sense to specify any exclude bits. (Stephane Eranian)

- let uncore code be more self contained, that is, not include it in arch/x86/kernel/cpu/perf_event.c (Peter Zijlstra)

- uncore pmu interrupt have its own NMI_DIE notifier entry. (Peter Zijlstra)

Known bugs:

- When hyper thread is enabled, both HTs will receive the NMI. In this case, the overflow status bits are not acked correctly.

TODO:

- Add support for uncore address/opcode match thing

- Add a new sub-command for uncore events statistics. For example, perf package -p <package-id> -e <event>

As usual, any comment is very appreciated.

Lin Ming