Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+34 -10
+34 -10
Documentation/timers/NO_HZ.txt
··· 24 24 workloads, you will normally -not- want this option. 25 25 26 26 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. 29 29 30 30 31 31 NEVER OMIT SCHEDULING-CLOCK TICKS ··· 121 121 "nohz_full=1,6-8" says that CPUs 1, 6, 7, and 8 are to be adaptive-ticks 122 122 CPUs. Note that you are prohibited from marking all of the CPUs as 123 123 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. 132 133 133 134 Alternatively, the CONFIG_NO_HZ_FULL_ALL=y Kconfig parameter specifies 134 135 that all CPUs other than the boot CPU are adaptive-ticks CPUs. This ··· 231 230 pin the "rcuo" kthreads to specific CPUs if desired. Otherwise, the 232 231 scheduler will decide where to run them, which might or might not be 233 232 where you want them to run. 233 + 234 + 235 + TESTING 236 + 237 + So you enable all the OS-jitter features described in this document, 238 + but do not see any change in your workload's behavior. Is this because 239 + your workload isn't affected that much by OS jitter, or is it because 240 + something else is in the way? This section helps answer this question 241 + by providing a simple OS-jitter test suite, which is available on branch 242 + master of the following git archive: 243 + 244 + git://git.kernel.org/pub/scm/linux/kernel/git/frederic/dynticks-testing.git 245 + 246 + Clone this archive and follow the instructions in the README file. 247 + This test procedure will produce a trace that will allow you to evaluate 248 + whether or not you have succeeded in removing OS jitter from your system. 249 + If this trace shows that you have removed OS jitter as much as is 250 + possible, then you can conclude that your workload is not all that 251 + sensitive to OS jitter. 252 + 253 + Note: this test requires that your system have at least two CPUs. 254 + We do not currently have a good way to remove OS jitter from single-CPU 255 + systems. 234 256 235 257 236 258 KNOWN ISSUES