rcu: Fix missing TICK_DEP_MASK_RCU_EXP dependency check
authorZqiang <qiang1.zhang@intel.com>
Tue, 20 Dec 2022 14:16:25 +0000 (22:16 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 May 2023 14:03:06 +0000 (23:03 +0900)
[ Upstream commit db7b464df9d820186e98a65aa6a10f0d51fbf8ce ]

This commit adds checks for the TICK_DEP_MASK_RCU_EXP bit, thus enabling
RCU expedited grace periods to actually force-enable scheduling-clock
interrupts on holdout CPUs.

Fixes: df1e849ae455 ("rcu: Enable tick for nohz_full CPUs slow to provide expedited QS")
Signed-off-by: Zqiang <qiang1.zhang@intel.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Anna-Maria Behnsen <anna-maria@linutronix.de>
Acked-by: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/trace/events/timer.h
kernel/time/tick-sched.c

index 2e713a7d9aa3a45c11c551d038d8ea4d087017d6..3e8619c72f774589592ff6149f93746f0b48eca7 100644 (file)
@@ -371,7 +371,8 @@ TRACE_EVENT(itimer_expire,
                tick_dep_name(PERF_EVENTS)              \
                tick_dep_name(SCHED)                    \
                tick_dep_name(CLOCK_UNSTABLE)           \
-               tick_dep_name_end(RCU)
+               tick_dep_name(RCU)                      \
+               tick_dep_name_end(RCU_EXP)
 
 #undef tick_dep_name
 #undef tick_dep_mask_name
index 68d81a4283c892b32e18c7342e19e14fa6275524..a46506f7ec6d02f99c19a3ddf6c3714587880750 100644 (file)
@@ -281,6 +281,11 @@ static bool check_tick_dependency(atomic_t *dep)
                return true;
        }
 
+       if (val & TICK_DEP_MASK_RCU_EXP) {
+               trace_tick_stop(0, TICK_DEP_MASK_RCU_EXP);
+               return true;
+       }
+
        return false;
 }