Commit 2b84def
perf: Split __perf_pending_irq() out of perf_pending_irq()
perf_pending_irq() invokes perf_event_wakeup() and __perf_pending_irq().
The former is in charge of waking any tasks which waits to be woken up
while the latter disables perf-events.
The irq_work perf_pending_irq(), while this an irq_work, the callback
is invoked in thread context on PREEMPT_RT. This is needed because all
the waking functions (wake_up_all(), kill_fasync()) acquire sleep locks
which must not be used with disabled interrupts.
Disabling events, as done by __perf_pending_irq(), expects a hardirq
context and disabled interrupts. This requirement is not fulfilled on
PREEMPT_RT.
Split functionality based on perf_event::pending_disable into irq_work
named `pending_disable_irq' and invoke it in hardirq context on
PREEMPT_RT. Rename the split out callback to perf_pending_disable().
Reported-by: Arnaldo Carvalho de Melo <[email protected]>
Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Tested-by: Marco Elver <[email protected]>
Tested-by: Arnaldo Carvalho de Melo <[email protected]>
Link: https://lore.kernel.org/r/[email protected]1 parent 16b9569 commit 2b84def
2 files changed
+23
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
783 | 783 | | |
784 | 784 | | |
785 | 785 | | |
| 786 | + | |
786 | 787 | | |
787 | 788 | | |
788 | 789 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2451 | 2451 | | |
2452 | 2452 | | |
2453 | 2453 | | |
2454 | | - | |
| 2454 | + | |
2455 | 2455 | | |
2456 | 2456 | | |
2457 | 2457 | | |
| |||
2491 | 2491 | | |
2492 | 2492 | | |
2493 | 2493 | | |
2494 | | - | |
| 2494 | + | |
2495 | 2495 | | |
2496 | 2496 | | |
2497 | 2497 | | |
| |||
5218 | 5218 | | |
5219 | 5219 | | |
5220 | 5220 | | |
| 5221 | + | |
5221 | 5222 | | |
5222 | 5223 | | |
5223 | 5224 | | |
| |||
6749 | 6750 | | |
6750 | 6751 | | |
6751 | 6752 | | |
6752 | | - | |
| 6753 | + | |
6753 | 6754 | | |
6754 | 6755 | | |
6755 | 6756 | | |
| |||
6787 | 6788 | | |
6788 | 6789 | | |
6789 | 6790 | | |
6790 | | - | |
| 6791 | + | |
6791 | 6792 | | |
6792 | 6793 | | |
6793 | 6794 | | |
6794 | | - | |
| 6795 | + | |
| 6796 | + | |
| 6797 | + | |
| 6798 | + | |
| 6799 | + | |
| 6800 | + | |
| 6801 | + | |
| 6802 | + | |
| 6803 | + | |
| 6804 | + | |
| 6805 | + | |
| 6806 | + | |
| 6807 | + | |
| 6808 | + | |
| 6809 | + | |
| 6810 | + | |
6795 | 6811 | | |
6796 | 6812 | | |
6797 | 6813 | | |
| |||
6814 | 6830 | | |
6815 | 6831 | | |
6816 | 6832 | | |
6817 | | - | |
6818 | | - | |
6819 | 6833 | | |
6820 | 6834 | | |
6821 | 6835 | | |
| |||
11956 | 11970 | | |
11957 | 11971 | | |
11958 | 11972 | | |
| 11973 | + | |
11959 | 11974 | | |
11960 | 11975 | | |
11961 | 11976 | | |
| |||
0 commit comments