Skip to content

Commit 2714c39

Browse files
author
Peter Zijlstra
committed
perf: Fix event multiplexing for exclusive groups
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 <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent 251ff2d commit 2714c39

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/events/core.c

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

26132613
error:
26142614
pmu->cancel_txn(pmu);
2615-
perf_mux_hrtimer_restart(cpuctx);
26162615
return -EAGAIN;
26172616
}
26182617

@@ -3672,6 +3671,7 @@ static int merge_sched_in(struct perf_event *event, void *data)
36723671

36733672
*can_add_hw = 0;
36743673
ctx->rotate_necessary = 1;
3674+
perf_mux_hrtimer_restart(cpuctx);
36753675
}
36763676

36773677
return 0;

0 commit comments

Comments
 (0)