aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/timers
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2013-04-29 13:09:41 -0400
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2013-06-10 16:42:37 -0400
commit295fde89be1b7dce874c0f38d8bb78975a25d46e (patch)
treee62cb6aad747e09a27c42145f0157a4cd961728b /Documentation/timers
parentefc151c33b971148894789dc7c5589dec46d4348 (diff)
nohz_full: Update based on Sedat Dilek review
Make it more clear that there are three options, and give hints as to which of the three is most likely to be useful in different situations. Reported-by: Sedat Dilek <sedat.dilek@gmail.com> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Diffstat (limited to 'Documentation/timers')
-rw-r--r--Documentation/timers/NO_HZ.txt58
1 files changed, 49 insertions, 9 deletions
diff --git a/Documentation/timers/NO_HZ.txt b/Documentation/timers/NO_HZ.txt
index 5b5322024067..d5323e075550 100644
--- a/Documentation/timers/NO_HZ.txt
+++ b/Documentation/timers/NO_HZ.txt
@@ -7,21 +7,59 @@ efficiency and reducing OS jitter. Reducing OS jitter is important for
7some types of computationally intensive high-performance computing (HPC) 7some types of computationally intensive high-performance computing (HPC)
8applications and for real-time applications. 8applications and for real-time applications.
9 9
10There are two main contexts in which the number of scheduling-clock 10There are three main ways of managing scheduling-clock interrupts
11interrupts can be reduced compared to the old-school approach of sending 11(also known as "scheduling-clock ticks" or simply "ticks"):
12a scheduling-clock interrupt to all CPUs every jiffy whether they need
13it or not (CONFIG_HZ_PERIODIC=y or CONFIG_NO_HZ=n for older kernels):
14 12
151. Idle CPUs (CONFIG_NO_HZ_IDLE=y or CONFIG_NO_HZ=y for older kernels). 131. Never omit scheduling-clock ticks (CONFIG_HZ_PERIODIC=y or
14 CONFIG_NO_HZ=n for older kernels). You normally will -not-
15 want to choose this option.
16 16
172. CPUs having only one runnable task (CONFIG_NO_HZ_FULL=y). 172. Omit scheduling-clock ticks on idle CPUs (CONFIG_NO_HZ_IDLE=y or
18 CONFIG_NO_HZ=y for older kernels). This is the most common
19 approach, and should be the default.
18 20
19These two cases are described in the following two sections, followed 213. Omit scheduling-clock ticks on CPUs that are either idle or that
22 have only one runnable task (CONFIG_NO_HZ_FULL=y). Unless you
23 are running realtime applications or certain types of HPC
24 workloads, you will normally -not- want this option.
25
26These three cases are described in the following three sections, followed
20by a third section on RCU-specific considerations and a fourth and final 27by a third section on RCU-specific considerations and a fourth and final
21section listing known issues. 28section listing known issues.
22 29
23 30
24IDLE CPUs 31NEVER OMIT SCHEDULING-CLOCK TICKS
32
33Very old versions of Linux from the 1990s and the very early 2000s
34are incapable of omitting scheduling-clock ticks. It turns out that
35there are some situations where this old-school approach is still the
36right approach, for example, in heavy workloads with lots of tasks
37that use short bursts of CPU, where there are very frequent idle
38periods, but where these idle periods are also quite short (tens or
39hundreds of microseconds). For these types of workloads, scheduling
40clock interrupts will normally be delivered any way because there
41will frequently be multiple runnable tasks per CPU. In these cases,
42attempting to turn off the scheduling clock interrupt will have no effect
43other than increasing the overhead of switching to and from idle and
44transitioning between user and kernel execution.
45
46This mode of operation can be selected using CONFIG_HZ_PERIODIC=y (or
47CONFIG_NO_HZ=n for older kernels).
48
49However, if you are instead running a light workload with long idle
50periods, failing to omit scheduling-clock interrupts will result in
51excessive power consumption. This is especially bad on battery-powered
52devices, where it results in extremely short battery lifetimes. If you
53are running light workloads, you should therefore read the following
54section.
55
56In addition, if you are running either a real-time workload or an HPC
57workload with short iterations, the scheduling-clock interrupts can
58degrade your applications performance. If this describes your workload,
59you should read the following two sections.
60
61
62OMIT SCHEDULING-CLOCK TICKS FOR IDLE CPUs
25 63
26If a CPU is idle, there is little point in sending it a scheduling-clock 64If a CPU is idle, there is little point in sending it a scheduling-clock
27interrupt. After all, the primary purpose of a scheduling-clock interrupt 65interrupt. After all, the primary purpose of a scheduling-clock interrupt
@@ -59,10 +97,12 @@ By default, CONFIG_NO_HZ_IDLE=y kernels boot with "nohz=on", enabling
59dyntick-idle mode. 97dyntick-idle mode.
60 98
61 99
62CPUs WITH ONLY ONE RUNNABLE TASK 100OMIT SCHEDULING-CLOCK TICKS FOR CPUs WITH ONLY ONE RUNNABLE TASK
63 101
64If a CPU has only one runnable task, there is little point in sending it 102If a CPU has only one runnable task, there is little point in sending it
65a scheduling-clock interrupt because there is no other task to switch to. 103a scheduling-clock interrupt because there is no other task to switch to.
104Note that omitting scheduling-clock ticks for CPUs with only one runnable
105task implies also omitting them for idle CPUs.
66 106
67The CONFIG_NO_HZ_FULL=y Kconfig option causes the kernel to avoid 107The CONFIG_NO_HZ_FULL=y Kconfig option causes the kernel to avoid
68sending scheduling-clock interrupts to CPUs with a single runnable task, 108sending scheduling-clock interrupts to CPUs with a single runnable task,