WARNING: CPU: 1 PID: 1 at kernel/events/core.c:7825 perf_pmu_register+0x385/0x390
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]
Peter Zijlstra
maintainerQuoted 21 lines · Borislav Petkov
Yo,
did the fix for this go anywhere? I'm still seeing it on rc4+tip/master:
[ 0.760493] AMD Power PMU detected [ 0.760689] LVT offset 0 assigned for vector 0x400 [ 0.761072] perf: AMD IBS detected (0x000007ff) [ 0.761340] ------------[ cut here ]------------ [ 0.761571] WARNING: CPU: 1 PID: 1 at kernel/events/core.c:7825 perf_pmu_register+0x385/0x390 [ 0.761909] Modules linked in: [ 0.762093] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.6.0-rc4+ #1 [ 0.762331] Hardware name: HP HP EliteBook 745 G3/807E, BIOS N73 Ver. 01.08 01/28/2016 [ 0.762674] 0000000000000000 ffffffff812dafa9 0000000000000000 0000000000000000 [ 0.763185] ffffffff810589ac ffffffff81a0fbe0 000000000000000a ffffffff8172ee85 [ 0.763672] 0000000000000000 ffff88042bdf9130 000000000008b000 ffffffff8112ff55 [ 0.764101] Call Trace: [ 0.764240] [<ffffffff812dafa9>] ? dump_stack+0x5c/0x83 [ 0.764454] [<ffffffff810589ac>] ? __warn+0xec/0x110 [ 0.764680] [<ffffffff8112ff55>] ? perf_pmu_register+0x385/0x390 [ 0.764956] [<ffffffff81b1b51d>] ? msr_init+0xbe/0xbe [ 0.765202] [<ffffffff81b1b5f1>] ? amd_iommu_pc_init+0xd4/0x141
Quoted 9 lines
[ 0.765475] [<ffffffff810003ef>] ? do_one_initcall+0xaf/0x200 [ 0.765718] [<ffffffff810768eb>] ? parse_args+0x2ab/0x4c0 [ 0.765935] [<ffffffff81b18fe1>] ? kernel_init_freeable+0x111/0x190 [ 0.766175] [<ffffffff815df02a>] ? kernel_init+0xa/0x100 [ 0.766389] [<ffffffff815eaa22>] ? ret_from_fork+0x22/0x40 [ 0.766620] [<ffffffff815df020>] ? rest_init+0x90/0x90 [ 0.766885] ---[ end trace 9285cdb6cf96a9b2 ]--- [ 0.767120] perf: amd_iommu: Detected. (0 banks, 0 counters/bank)
Oh, cute there's two different ones.
31d50c551e30 ("perf/x86/amd/uncore: Do not register a task ctx for uncore PMUs")
Doth the below fixeth thingies?
---
Subject: perf/amd/iommu: Do not register a task ctx for uncore like PMUs
The new sanity check introduced by:
26657848502b ("perf/core: Verify we have a single perf_hw_context PMU")
... triggered on the AMD IOMMU driver.
IOMMUs are not per logical CPU, they cannot have per-task counters. Fix it.
--- arch/x86/events/amd/iommu.c | 1 + 1 file changed, 1 insertion(+)
arch/x86/events/amd/iommu.c +1 -0
@@ -474,6 +474,7 @@ static __init int _init_perf_amd_iommu(static struct perf_amd_iommu __perf_iommu = { .pmu = { + .task_ctx_nr = perf_invalid_context, .event_init = perf_iommu_event_init, .add = perf_iommu_add, .del = perf_iommu_del,
Quoted 1 line · Peter Zijlstra
Doth the below fixeth thingies?
It doth. Thanks!
Signature · 4 lines
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.tip-bot for Peter Zijlstra
merge bot[tip:perf/core] perf/x86/amd/iommu: Do not register a task ctx for uncore like PMUs
In reply to Peter Zijlstraperf/x86/amd/iommu: Do not register a task ctx for uncore like PMUs
Commit-ID: 8482716b9d865db34c55d4bf2fed19498e7195b9 Gitweb: http://git.kernel.org/tip/8482716b9d865db34c55d4bf2fed19498e7195b9 Author: Peter Zijlstra <[email protected]> AuthorDate: Sun, 24 Apr 2016 00:42:55 +0200 Committer: Ingo Molnar <[email protected]> CommitDate: Thu, 5 May 2016 10:11:28 +0200
perf/x86/amd/iommu: Do not register a task ctx for uncore like PMUs
The new sanity check introduced by:
26657848502b ("perf/core: Verify we have a single perf_hw_context PMU")
... triggered on the AMD IOMMU driver.
IOMMUs are not per logical CPU, they cannot have per-task counters. Fix it.
--- arch/x86/events/amd/iommu.c | 1 + 1 file changed, 1 insertion(+)
arch/x86/events/amd/iommu.c +1 -0
@@ -474,6 +474,7 @@ static __init int _init_perf_amd_iommu(static struct perf_amd_iommu __perf_iommu = { .pmu = { + .task_ctx_nr = perf_invalid_context, .event_init = perf_iommu_event_init, .add = perf_iommu_add, .del = perf_iommu_del,