Skip to content

Commit

Permalink
rcu: Fix missing TICK_DEP_MASK_RCU_EXP dependency check
Browse files Browse the repository at this point in the history
[ Upstream commit db7b464 ]

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: df1e849 ("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>
  • Loading branch information
qiangzh3 authored and gregkh committed May 11, 2023
1 parent 6dd75bc commit b673500
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/trace/events/timer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions kernel/time/tick-sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit b673500

Please sign in to comment.