summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2020-10-29 16:29:53 +0100
committerPeter Zijlstra <peterz@infradead.org>2020-11-09 18:12:36 +0100
commit2714c3962f304d031d5016c963c4b459337b0749 (patch)
tree2862af6a6ad9ed4cc6fd75f1503e03b60cc37024 /kernel
parent251ff2d49347793d348babcff745289b11910e96 (diff)
downloadlinux-2714c3962f304d031d5016c963c4b459337b0749.tar.gz
linux-2714c3962f304d031d5016c963c4b459337b0749.tar.bz2
linux-2714c3962f304d031d5016c963c4b459337b0749.zip
perf: Fix event multiplexing for exclusive groups
Commit 9e6302056f80 ("perf: Use hrtimers for event multiplexing") placed the hrtimer (re)start call in the wrong place. Instead of capturing all scheduling failures, it only considered the PMU failure. The result is that groups using perf_event_attr::exclusive are no longer rotated. Fixes: 9e6302056f80 ("perf: Use hrtimers for event multiplexing") Reported-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/20201029162902.038667689@infradead.org
Diffstat (limited to 'kernel')
-rw-r--r--kernel/events/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/events/core.c b/kernel/events/core.c
index f0e526866a1c..00be48acdc36 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -2612,7 +2612,6 @@ group_error:
error:
pmu->cancel_txn(pmu);
- perf_mux_hrtimer_restart(cpuctx);
return -EAGAIN;
}
@@ -3672,6 +3671,7 @@ static int merge_sched_in(struct perf_event *event, void *data)
*can_add_hw = 0;
ctx->rotate_necessary = 1;
+ perf_mux_hrtimer_restart(cpuctx);
}
return 0;