Commit 7e406d1
Peter Zijlstra
sched: Avoid double preemption in __cond_resched_*lock*()
For PREEMPT/DYNAMIC_PREEMPT the *_unlock() will already trigger a
preemption, no point in then calling preempt_schedule_common()
*again*.
Use _cond_resched() instead, since this is a NOP for the preemptible
configs while it provide a preemption point for the others.
Reported-by: xuhaifeng <xuhaifeng@oppo.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/YcGnvDEYBwOiV0cR@hirez.programming.kicks-ass.net1 parent a315da5 commit 7e406d1
1 file changed
Lines changed: 3 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8218 | 8218 | | |
8219 | 8219 | | |
8220 | 8220 | | |
8221 | | - | |
8222 | | - | |
8223 | | - | |
| 8221 | + | |
8224 | 8222 | | |
8225 | 8223 | | |
8226 | 8224 | | |
| |||
8238 | 8236 | | |
8239 | 8237 | | |
8240 | 8238 | | |
8241 | | - | |
8242 | | - | |
8243 | | - | |
| 8239 | + | |
8244 | 8240 | | |
8245 | 8241 | | |
8246 | 8242 | | |
| |||
8258 | 8254 | | |
8259 | 8255 | | |
8260 | 8256 | | |
8261 | | - | |
8262 | | - | |
8263 | | - | |
| 8257 | + | |
8264 | 8258 | | |
8265 | 8259 | | |
8266 | 8260 | | |
| |||
0 commit comments