]> www.infradead.org Git - users/jedix/linux-maple.git/commit
perf: Move irq_work_queue() where the event is prepared.
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Thu, 4 Jul 2024 17:03:35 +0000 (19:03 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Tue, 9 Jul 2024 11:26:34 +0000 (13:26 +0200)
commit058244c683111d44a5de16ac74f19a1754dd7a0c
treeee99bc0d607fbc46c481256f634ab5c4da6054f5
parent3a5465418f5fd970e86a86c7f4075be262682840
perf: Move irq_work_queue() where the event is prepared.

Only if perf_event::pending_sigtrap is zero, the irq_work accounted by
increminging perf_event::nr_pending. The member perf_event::pending_addr
might be overwritten by a subsequent event if the signal was not yet
delivered and is expected. The irq_work will not be enqeueued again
because it has a check to be only enqueued once.

Move irq_work_queue() to where the counter is incremented and
perf_event::pending_sigtrap is set to make it more obvious that the
irq_work is scheduled once.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Marco Elver <elver@google.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Link: https://lore.kernel.org/r/20240704170424.1466941-2-bigeasy@linutronix.de
kernel/events/core.c