[RFC PATCH 0/8] rcu/sched: Fix ignored rescheduling after rcu_eqs_enter() v3

Frederic Weisbecker
2021-01-09T02:06:23Z

(This was [PATCH 0/4] sched/idle: Fix missing need_resched() checks after rcu_idle_enter() v2)

I initially followed Peterz review but eventually I tried a different
approach. Instead of handling the late wake up from rcu_idle_enter(),
I've split the delayed rcuog wake up and moved it right before
the last generic need_resched() check, it makes more sense and we don't
need to fiddle with cpuidle core and drivers anymore. It's also less
error prone.

I also fixed the nohz_full case and (hopefully) the guest case.

And this comes with debugging to prevent from that pattern to happen
again.

Only lightly tested so far.

git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git
sched/idle-v3

HEAD: d95fc510e804a5c4658a823ff12d9caba1d906c7

Thanks,
Frederic
---

Frederic Weisbecker (8):
rcu: Remove superfluous rdp fetch
rcu: Pull deferred rcuog wake up to rcu_eqs_enter() callers
rcu/nocb: Perform deferred wake up before last idle's need_resched() check
rcu/nocb: Trigger self-IPI on late deferred wake up before user resume
entry: Explicitly flush pending rcuog wakeup before last rescheduling points
sched: Report local wake up on resched blind zone within idle loop
entry: Report local wake up on resched blind zone while resuming to user
timer: Report ignored local enqueue in nohz mode

include/linux/rcupdate.h | 2 ++
include/linux/sched.h | 11 ++++++++
kernel/entry/common.c | 10 ++++++++
kernel/rcu/tree.c | 27 ++++++++++++++++++--
kernel/rcu/tree.h | 2 +-
kernel/rcu/tree_plugin.h | 30 +++++++++++++++-------
kernel/sched/core.c | 66 +++++++++++++++++++++++++++++++++++++++++++++++-
kernel/sched/idle.c | 6 +++++
kernel/sched/sched.h | 3 +++
9 files changed, 144 insertions(+), 13 deletions(-)