From: Sergey Senozhatsky Date: Fri, 21 May 2021 15:56:24 +0000 (+0900) Subject: rcu: Do not disable GP stall detection in rcu_cpu_stall_reset() X-Git-Tag: accepted/tizen/unified/20230118.172025~6579^2^2~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a80be428fbc1f1f3bc9ed9245906dd60850887f5;p=platform%2Fkernel%2Flinux-rpi.git rcu: Do not disable GP stall detection in rcu_cpu_stall_reset() rcu_cpu_stall_reset() is one of the functions virtual CPUs execute during VM resume in order to handle jiffies skew that can trigger false positive stall warnings. Paul has pointed out that this approach is problematic because rcu_cpu_stall_reset() disables RCU grace period stall-detection virtually forever, while in fact it can just restart the stall-detection timeout. Suggested-by: "Paul E. McKenney" Signed-off-by: Sergey Senozhatsky Signed-off-by: Signed-off-by: Paul E. McKenney --- diff --git a/kernel/rcu/tree_stall.h b/kernel/rcu/tree_stall.h index 0e7a607..e199022d 100644 --- a/kernel/rcu/tree_stall.h +++ b/kernel/rcu/tree_stall.h @@ -119,17 +119,14 @@ static void panic_on_rcu_stall(void) } /** - * rcu_cpu_stall_reset - prevent further stall warnings in current grace period - * - * Set the stall-warning timeout way off into the future, thus preventing - * any RCU CPU stall-warning messages from appearing in the current set of - * RCU grace periods. + * rcu_cpu_stall_reset - restart stall-warning timeout for current grace period * * The caller must disable hard irqs. */ void rcu_cpu_stall_reset(void) { - WRITE_ONCE(rcu_state.jiffies_stall, jiffies + ULONG_MAX / 2); + WRITE_ONCE(rcu_state.jiffies_stall, + jiffies + rcu_jiffies_till_stall_check()); } //////////////////////////////////////////////////////////////////////////////