Skip to content

Commit b44379a

Browse files
committed
nohz_full: Add Kconfig parameter for scalable detection of all-idle state
At least one CPU must keep the scheduling-clock tick running for timekeeping purposes whenever there is a non-idle CPU. However, with the new nohz_full adaptive-idle machinery, it is difficult to distinguish between all CPUs really being idle as opposed to all non-idle CPUs being in adaptive-ticks mode. This commit therefore adds a Kconfig parameter as a first step towards enabling a scalable detection of full-system idle state. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Steven Rostedt <rostedt@goodmis.org> [ paulmck: Update help text per Frederic Weisbecker. ] Reviewed-by: Josh Triplett <josh@joshtriplett.org>
1 parent 8bdf7a2 commit b44379a

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

‎kernel/time/Kconfig‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,29 @@ config NO_HZ_FULL_ALL
134134
Note the boot CPU will still be kept outside the range to
135135
handle the timekeeping duty.
136136

137+
config NO_HZ_FULL_SYSIDLE
138+
bool "Detect full-system idle state for full dynticks system"
139+
depends on NO_HZ_FULL
140+
default n
141+
help
142+
At least one CPU must keep the scheduling-clock tick running for
143+
timekeeping purposes whenever there is a non-idle CPU, where
144+
"non-idle" also includes dynticks CPUs as long as they are
145+
running non-idle tasks. Because the underlying adaptive-tick
146+
support cannot distinguish between all CPUs being idle and
147+
all CPUs each running a single task in dynticks mode, the
148+
underlying support simply ensures that there is always a CPU
149+
handling the scheduling-clock tick, whether or not all CPUs
150+
are idle. This Kconfig option enables scalable detection of
151+
the all-CPUs-idle state, thus allowing the scheduling-clock
152+
tick to be disabled when all CPUs are idle. Note that scalable
153+
detection of the all-CPUs-idle state means that larger systems
154+
will be slower to declare the all-CPUs-idle state.
155+
156+
Say Y if you would like to help debug all-CPUs-idle detection.
157+
158+
Say N if you are unsure.
159+
137160
config NO_HZ
138161
bool "Old Idle dynticks config"
139162
depends on !ARCH_USES_GETTIMEOFFSET && GENERIC_CLOCKEVENTS

0 commit comments

Comments
 (0)