Skip to content

Commit 8bdf7a2

Browse files
committed
nohz_full: Add testing information to documentation
This commit adds information about testing nohz_full, and also emphasizes the fact that you need a multi-CPU system to get any benefit from nohz_full. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Acked-by: Frederic Weisbecker <fweisbec@gmail.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
1 parent feed66e commit 8bdf7a2

1 file changed

Lines changed: 34 additions & 10 deletions

File tree

‎Documentation/timers/NO_HZ.txt‎

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ There are three main ways of managing scheduling-clock interrupts
2424
workloads, you will normally -not- want this option.
2525

2626
These three cases are described in the following three sections, followed
27-
by a third section on RCU-specific considerations and a fourth and final
28-
section listing known issues.
27+
by a third section on RCU-specific considerations, a fourth section
28+
discussing testing, and a fifth and final section listing known issues.
2929

3030

3131
NEVER OMIT SCHEDULING-CLOCK TICKS
@@ -121,14 +121,15 @@ boot parameter specifies the adaptive-ticks CPUs. For example,
121121
"nohz_full=1,6-8" says that CPUs 1, 6, 7, and 8 are to be adaptive-ticks
122122
CPUs. Note that you are prohibited from marking all of the CPUs as
123123
adaptive-tick CPUs: At least one non-adaptive-tick CPU must remain
124-
online to handle timekeeping tasks in order to ensure that system calls
125-
like gettimeofday() returns accurate values on adaptive-tick CPUs.
126-
(This is not an issue for CONFIG_NO_HZ_IDLE=y because there are no
127-
running user processes to observe slight drifts in clock rate.)
128-
Therefore, the boot CPU is prohibited from entering adaptive-ticks
129-
mode. Specifying a "nohz_full=" mask that includes the boot CPU will
130-
result in a boot-time error message, and the boot CPU will be removed
131-
from the mask.
124+
online to handle timekeeping tasks in order to ensure that system
125+
calls like gettimeofday() returns accurate values on adaptive-tick CPUs.
126+
(This is not an issue for CONFIG_NO_HZ_IDLE=y because there are no running
127+
user processes to observe slight drifts in clock rate.) Therefore, the
128+
boot CPU is prohibited from entering adaptive-ticks mode. Specifying a
129+
"nohz_full=" mask that includes the boot CPU will result in a boot-time
130+
error message, and the boot CPU will be removed from the mask. Note that
131+
this means that your system must have at least two CPUs in order for
132+
CONFIG_NO_HZ_FULL=y to do anything for you.
132133

133134
Alternatively, the CONFIG_NO_HZ_FULL_ALL=y Kconfig parameter specifies
134135
that all CPUs other than the boot CPU are adaptive-ticks CPUs. This
@@ -232,6 +233,29 @@ scheduler will decide where to run them, which might or might not be
232233
where you want them to run.
233234

234235

236+
TESTING
237+
238+
So you enable all the OS-jitter features described in this document,
239+
but do not see any change in your workload's behavior. Is this because
240+
your workload isn't affected that much by OS jitter, or is it because
241+
something else is in the way? This section helps answer this question
242+
by providing a simple OS-jitter test suite, which is available on branch
243+
master of the following git archive:
244+
245+
git://git.kernel.org/pub/scm/linux/kernel/git/frederic/dynticks-testing.git
246+
247+
Clone this archive and follow the instructions in the README file.
248+
This test procedure will produce a trace that will allow you to evaluate
249+
whether or not you have succeeded in removing OS jitter from your system.
250+
If this trace shows that you have removed OS jitter as much as is
251+
possible, then you can conclude that your workload is not all that
252+
sensitive to OS jitter.
253+
254+
Note: this test requires that your system have at least two CPUs.
255+
We do not currently have a good way to remove OS jitter from single-CPU
256+
systems.
257+
258+
235259
KNOWN ISSUES
236260

237261
o Dyntick-idle slows transitions to and from idle slightly.

0 commit comments

Comments
 (0)