lkml.org 
[lkml]   [2012]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[BUG] perf: perf_swevent PMU should not be on rotation_list
From
Hi,

I was looking at the rotation code and I found out that when
I monitor a SW event (in my case a probe), I end up having
two PMUs on the rotation list on Intel Core: cpu and software.

I thought there was no multiplexing needed for SW events.

So why is the SW PMU on the rotation list causing extra
iterations through the rotation code?

Shouldn't we do something like:

--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -771,6 +780,9 @@ static void perf_pmu_rotate_start(struct pmu *pmu)
struct perf_cpu_context *cpuctx = this_cpu_ptr(pmu->pmu_cpu_context);
struct list_head *head = &__get_cpu_var(rotation_list);

+ if (pmu->type == PERF_TYPE_SOFTWARE)
+ return;
+
WARN_ON(!irqs_disabled());

if (list_empty(&cpuctx->rotation_list))

\
 
 \ /
  Last update: 2012-09-05 16:43    [W:0.036 / U:0.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site