Commit 04b0162
Peter Zijlstra
perf/uprobe: split uprobe_unregister()
With uprobe_unregister() having grown a synchronize_srcu(), it becomes
fairly slow to call. Esp. since both users of this API call it in a
loop.
Peel off the sync_srcu() and do it once, after the loop.
We also need to add uprobe_unregister_sync() into uprobe_register()'s
error handling path, as we need to be careful about returning to the
caller before we have a guarantee that partially attached consumer won't
be called anymore. This is an unlikely slow path and this should be
totally fine to be slow in the case of a failed attach.
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Signed-off-by: "Peter Zijlstra (Intel)" <[email protected]>
Co-developed-by: Andrii Nakryiko <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Reviewed-by: Oleg Nesterov <[email protected]>
Link: https://lore.kernel.org/r/[email protected]1 parent cc01bd0 commit 04b0162
File tree
5 files changed
+32
-11
lines changed- include/linux
- kernel
- events
- trace
- tools/testing/selftests/bpf/bpf_testmod
5 files changed
+32
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
| 118 | + | |
| 119 | + | |
119 | 120 | | |
120 | 121 | | |
121 | 122 | | |
| |||
164 | 165 | | |
165 | 166 | | |
166 | 167 | | |
167 | | - | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
168 | 172 | | |
169 | 173 | | |
170 | 174 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1105 | 1105 | | |
1106 | 1106 | | |
1107 | 1107 | | |
1108 | | - | |
| 1108 | + | |
1109 | 1109 | | |
1110 | 1110 | | |
1111 | 1111 | | |
1112 | | - | |
| 1112 | + | |
1113 | 1113 | | |
1114 | 1114 | | |
1115 | 1115 | | |
| |||
1121 | 1121 | | |
1122 | 1122 | | |
1123 | 1123 | | |
1124 | | - | |
| 1124 | + | |
1125 | 1125 | | |
1126 | 1126 | | |
1127 | 1127 | | |
| 1128 | + | |
| 1129 | + | |
1128 | 1130 | | |
1129 | | - | |
| 1131 | + | |
| 1132 | + | |
1130 | 1133 | | |
1131 | 1134 | | |
1132 | 1135 | | |
| |||
1138 | 1141 | | |
1139 | 1142 | | |
1140 | 1143 | | |
1141 | | - | |
| 1144 | + | |
1142 | 1145 | | |
1143 | 1146 | | |
1144 | 1147 | | |
| |||
1196 | 1199 | | |
1197 | 1200 | | |
1198 | 1201 | | |
1199 | | - | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
1200 | 1209 | | |
1201 | 1210 | | |
1202 | 1211 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3184 | 3184 | | |
3185 | 3185 | | |
3186 | 3186 | | |
3187 | | - | |
| 3187 | + | |
| 3188 | + | |
| 3189 | + | |
| 3190 | + | |
3188 | 3191 | | |
3189 | 3192 | | |
3190 | 3193 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1097 | 1097 | | |
1098 | 1098 | | |
1099 | 1099 | | |
| 1100 | + | |
1100 | 1101 | | |
1101 | 1102 | | |
1102 | 1103 | | |
| |||
1105 | 1106 | | |
1106 | 1107 | | |
1107 | 1108 | | |
1108 | | - | |
| 1109 | + | |
| 1110 | + | |
1109 | 1111 | | |
1110 | 1112 | | |
| 1113 | + | |
| 1114 | + | |
1111 | 1115 | | |
1112 | 1116 | | |
1113 | 1117 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
475 | 475 | | |
476 | 476 | | |
477 | 477 | | |
478 | | - | |
| 478 | + | |
| 479 | + | |
479 | 480 | | |
480 | 481 | | |
481 | 482 | | |
| |||
0 commit comments