diff options
author | Frederic Weisbecker <frederic@kernel.org> | 2021-02-01 00:05:46 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2021-02-17 14:12:43 +0100 |
commit | f8bb5cae9616224a39cbb399de382d36ac41df10 (patch) | |
tree | 13b2de7448909cfade6100836b4cd561ecded298 /kernel/entry | |
parent | rcu/nocb: Perform deferred wake up before last idle's need_resched() check (diff) | |
download | linux-f8bb5cae9616224a39cbb399de382d36ac41df10.tar.xz linux-f8bb5cae9616224a39cbb399de382d36ac41df10.zip |
rcu/nocb: Trigger self-IPI on late deferred wake up before user resume
Entering RCU idle mode may cause a deferred wake up of an RCU NOCB_GP
kthread (rcuog) to be serviced.
Unfortunately the call to rcu_user_enter() is already past the last
rescheduling opportunity before we resume to userspace or to guest mode.
We may escape there with the woken task ignored.
The ultimate resort to fix every callsites is to trigger a self-IPI
(nohz_full depends on arch to implement arch_irq_work_raise()) that will
trigger a reschedule on IRQ tail or guest exit.
Eventually every site that want a saner treatment will need to carefully
place a call to rcu_nocb_flush_deferred_wakeup() before the last explicit
need_resched() check upon resume.
Fixes: 96d3fd0d315a (rcu: Break call_rcu() deadlock involving scheduler and perf)
Reported-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/20210131230548.32970-4-frederic@kernel.org
Diffstat (limited to 'kernel/entry')
0 files changed, 0 insertions, 0 deletions