Thread (11 messages) flat view 11 messages, 4 authors, 2016-03-22
STALE3839d

[PATCH V1] perf: qcom: Add L3 cache PMU driver

From: peterz@infradead.org (Peter Zijlstra)
Date: 2016-03-21 12:04:09

On Mon, Mar 21, 2016 at 10:35:08AM +0000, Mark Rutland wrote:
quoted
+static
+int qcom_l3_cache__event_add(struct perf_event *event, int flags)
+{
+	struct l3cache_pmu *system = to_l3cache_pmu(event->pmu);
+	struct hw_perf_event *hwc = &event->hw;
+	int idx;
+	int prev_cpu;
+	int err = 0;
+
+	/*
+	 * We need to disable the pmu while adding the event, otherwise
+	 * the perf tick might kick-in and re-add this event.
+	 */
+	perf_pmu_disable(event->pmu);
Why did you write that? If you really need this you did something
seriously wrong elsewhere, because:

kernel/events/core.c:event_sched_in() is the only place calling
pmu::add() and that explicitly already does this.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help