Tidy up and use cond_resched_rcu_qs when calling cond_resched and reporting potential quiescent state to RCU. Splitting this change in this way allows easy backporting to -stable for kernel versions not having cond_resched_rcu_qs().
Showing the changes to kernel/workqueue.c (1 of 1 file). Show all
Unified · Split
| @@ -2046,8 +2046,7 @@ __acquires(&pool->lock) · 2045 unmodified lines | |||
| 2046 | * stop_machine. At the same time, report a quiescent RCU state so | 2046 | * stop_machine. At the same time, report a quiescent RCU state so |
| 2047 | * the same condition doesn't freeze RCU. | 2047 | * the same condition doesn't freeze RCU. |
| 2048 | */ | 2048 | */ |
| 2049 | rcu_note_voluntary_context_switch(current); | 2049 | cond_resched_rcu_qs(); |
| 2050 | cond_resched(); | ||
| 2051 | 2050 | ||
| 2052 | spin_lock_irq(&pool->lock); | 2051 | spin_lock_irq(&pool->lock); |
| 2053 | 2052 | ||