mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +00:00
rcu-tasks: Restore use of timers for non-RT kernels
The use of hrtimers for RCU-tasks grace-period delays works well in general, but can result in excessive grace-period delays for some corner-case workloads. This commit therefore reverts to the use of timers for non-RT kernels to mitigate those grace-period delays. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
This commit is contained in:
parent
777570d9ef
commit
bddf7122f7
1 changed files with 7 additions and 3 deletions
|
@ -654,9 +654,13 @@ static void rcu_tasks_wait_gp(struct rcu_tasks *rtp)
|
||||||
|
|
||||||
// Slowly back off waiting for holdouts
|
// Slowly back off waiting for holdouts
|
||||||
set_tasks_gp_state(rtp, RTGS_WAIT_SCAN_HOLDOUTS);
|
set_tasks_gp_state(rtp, RTGS_WAIT_SCAN_HOLDOUTS);
|
||||||
|
if (!IS_ENABLED(CONFIG_PREEMPT_RT)) {
|
||||||
|
schedule_timeout_idle(fract);
|
||||||
|
} else {
|
||||||
exp = jiffies_to_nsecs(fract);
|
exp = jiffies_to_nsecs(fract);
|
||||||
__set_current_state(TASK_IDLE);
|
__set_current_state(TASK_IDLE);
|
||||||
schedule_hrtimeout_range(&exp, jiffies_to_nsecs(HZ / 2), HRTIMER_MODE_REL_HARD);
|
schedule_hrtimeout_range(&exp, jiffies_to_nsecs(HZ / 2), HRTIMER_MODE_REL_HARD);
|
||||||
|
}
|
||||||
|
|
||||||
if (fract < HZ)
|
if (fract < HZ)
|
||||||
fract++;
|
fract++;
|
||||||
|
|
Loading…
Reference in a new issue