Skip to content

Commit 7dce450

Browse files
Peter Zijlstragregkh
authored andcommitted
perf: Fix event multiplexing for exclusive groups
[ Upstream commit 2714c39 ] Commit 9e63020 ("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: 9e63020 ("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 Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 3a5a900 commit 7dce450

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎kernel/events/core.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2597,7 +2597,6 @@ group_sched_in(struct perf_event *group_event,
25972597

25982598
error:
25992599
pmu->cancel_txn(pmu);
2600-
perf_mux_hrtimer_restart(cpuctx);
26012600
return -EAGAIN;
26022601
}
26032602

@@ -3653,6 +3652,7 @@ static int merge_sched_in(struct perf_event *event, void *data)
36533652

36543653
*can_add_hw = 0;
36553654
ctx->rotate_necessary = 1;
3655+
perf_mux_hrtimer_restart(cpuctx);
36563656
}
36573657

36583658
return 0;

0 commit comments

Comments
 (0)