Commit 975707f
Peter Zijlstra
sched: Prepare to use balance_push in ttwu()
In preparation of using the balance_push state in ttwu() we need it to
provide a reliable and consistent state.
The immediate problem is that rq->balance_callback gets cleared every
schedule() and then re-set in the balance_push_callback() itself. This
is not a reliable signal, so add a variable that stays set during the
entire time.
Also move setting it before the synchronize_rcu() in
sched_cpu_deactivate(), such that we get guaranteed visibility to
ttwu(), which is a preempt-disable region.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Valentin Schneider <valentin.schneider@arm.com>
Tested-by: Valentin Schneider <valentin.schneider@arm.com>
Link: https://lkml.kernel.org/r/20210121103506.966069627@infradead.org1 parent 640f17c commit 975707f
2 files changed
Lines changed: 7 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7320 | 7320 | | |
7321 | 7321 | | |
7322 | 7322 | | |
| 7323 | + | |
7323 | 7324 | | |
7324 | 7325 | | |
7325 | 7326 | | |
| |||
7489 | 7490 | | |
7490 | 7491 | | |
7491 | 7492 | | |
| 7493 | + | |
| 7494 | + | |
7492 | 7495 | | |
7493 | | - | |
7494 | | - | |
7495 | | - | |
| 7496 | + | |
| 7497 | + | |
| 7498 | + | |
7496 | 7499 | | |
7497 | 7500 | | |
7498 | 7501 | | |
7499 | 7502 | | |
7500 | 7503 | | |
7501 | | - | |
7502 | | - | |
7503 | 7504 | | |
7504 | 7505 | | |
7505 | 7506 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
975 | 975 | | |
976 | 976 | | |
977 | 977 | | |
| 978 | + | |
978 | 979 | | |
979 | 980 | | |
980 | 981 | | |
| |||
0 commit comments