[v2,1/4] perf: Simplify group_sched_out()
diff mbox series

Message ID 20201029162901.904060564@infradead.org
State Accepted
Commit 8c7855d82933bab7fa5e96f0e568fc125c2e1ab4
Headers show
  • perf: Fix perf_event_attr::exclusive rotation
Related show

Commit Message

Peter Zijlstra Oct. 29, 2020, 4:27 p.m. UTC
Since event_sched_out() clears cpuctx->exclusive upon removal of an
exclusive event (and only group leaders can be exclusive), there is no
point in group_sched_out() trying to do it too. It is impossible for
cpuctx->exclusive to still be set here.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
 kernel/events/core.c |    3 ---
 1 file changed, 3 deletions(-)

diff mbox series

--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -2312,9 +2312,6 @@  group_sched_out(struct perf_event *group
 		event_sched_out(event, cpuctx, ctx);
-	if (group_event->attr.exclusive)
-		cpuctx->exclusive = 0;
 #define DETACH_GROUP	0x01UL