Commit ae79270
Peter Zijlstra
sched: Optimize finish_lock_switch()
The kernel test robot measured a -1.6% performance regression on
will-it-scale/sched_yield due to commit:
2558aac ("sched/hotplug: Ensure only per-cpu kthreads run during hotplug")
Even though we were careful to replace a single load with another
single load from the same cacheline.
Restore finish_lock_switch() to the exact state before the offending
patch and solve the problem differently.
Fixes: 2558aac ("sched/hotplug: Ensure only per-cpu kthreads run during hotplug")
Reported-by: kernel test robot <oliver.sang@intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20201210161408.GX3021@hirez.programming.kicks-ass.net1 parent 5b78f2d commit ae79270
2 files changed
Lines changed: 20 additions & 33 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3985 | 3985 | | |
3986 | 3986 | | |
3987 | 3987 | | |
| 3988 | + | |
| 3989 | + | |
| 3990 | + | |
| 3991 | + | |
| 3992 | + | |
| 3993 | + | |
| 3994 | + | |
3988 | 3995 | | |
3989 | 3996 | | |
3990 | 3997 | | |
3991 | 3998 | | |
3992 | 3999 | | |
3993 | | - | |
| 4000 | + | |
3994 | 4001 | | |
3995 | | - | |
3996 | | - | |
3997 | 4002 | | |
3998 | 4003 | | |
3999 | 4004 | | |
| |||
4014 | 4019 | | |
4015 | 4020 | | |
4016 | 4021 | | |
4017 | | - | |
4018 | | - | |
4019 | | - | |
4020 | | - | |
4021 | | - | |
4022 | | - | |
4023 | | - | |
4024 | | - | |
4025 | | - | |
4026 | | - | |
4027 | | - | |
4028 | | - | |
4029 | | - | |
4030 | | - | |
4031 | | - | |
4032 | 4022 | | |
4033 | 4023 | | |
4034 | 4024 | | |
| |||
4044 | 4034 | | |
4045 | 4035 | | |
4046 | 4036 | | |
4047 | | - | |
4048 | | - | |
4049 | | - | |
4050 | | - | |
4051 | 4037 | | |
4052 | 4038 | | |
4053 | 4039 | | |
| |||
4075 | 4061 | | |
4076 | 4062 | | |
4077 | 4063 | | |
4078 | | - | |
| 4064 | + | |
4079 | 4065 | | |
4080 | 4066 | | |
4081 | 4067 | | |
| |||
7256 | 7242 | | |
7257 | 7243 | | |
7258 | 7244 | | |
| 7245 | + | |
| 7246 | + | |
| 7247 | + | |
| 7248 | + | |
7259 | 7249 | | |
7260 | 7250 | | |
7261 | 7251 | | |
| |||
7305 | 7295 | | |
7306 | 7296 | | |
7307 | 7297 | | |
7308 | | - | |
| 7298 | + | |
7309 | 7299 | | |
7310 | | - | |
| 7300 | + | |
7311 | 7301 | | |
7312 | 7302 | | |
7313 | 7303 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
975 | 975 | | |
976 | 976 | | |
977 | 977 | | |
978 | | - | |
979 | 978 | | |
980 | 979 | | |
981 | 980 | | |
| |||
1226 | 1225 | | |
1227 | 1226 | | |
1228 | 1227 | | |
| 1228 | + | |
| 1229 | + | |
1229 | 1230 | | |
1230 | 1231 | | |
1231 | 1232 | | |
| |||
1243 | 1244 | | |
1244 | 1245 | | |
1245 | 1246 | | |
1246 | | - | |
1247 | 1247 | | |
1248 | | - | |
| 1248 | + | |
| 1249 | + | |
1249 | 1250 | | |
1250 | 1251 | | |
1251 | 1252 | | |
| |||
1408 | 1409 | | |
1409 | 1410 | | |
1410 | 1411 | | |
1411 | | - | |
1412 | | - | |
1413 | | - | |
1414 | 1412 | | |
1415 | 1413 | | |
1416 | 1414 | | |
1417 | 1415 | | |
1418 | 1416 | | |
1419 | 1417 | | |
1420 | 1418 | | |
1421 | | - | |
| 1419 | + | |
1422 | 1420 | | |
1423 | 1421 | | |
1424 | 1422 | | |
1425 | 1423 | | |
1426 | 1424 | | |
1427 | | - | |
1428 | 1425 | | |
1429 | 1426 | | |
1430 | 1427 | | |
| |||
0 commit comments