Commit | Line | Data |
---|---|---|
79bf2bb3 TG |
1 | # |
2 | # Timer subsystem related configuration options | |
3 | # | |
3872c48b | 4 | |
b5e498ad TG |
5 | # Options selectable by arch Kconfig |
6 | ||
7 | # Watchdog function for clocksources to detect instabilities | |
8 | config CLOCKSOURCE_WATCHDOG | |
9 | bool | |
10 | ||
11 | # Architecture has extra clocksource data | |
12 | config ARCH_CLOCKSOURCE_DATA | |
13 | bool | |
14 | ||
576094b7 JS |
15 | # Timekeeping vsyscall support |
16 | config GENERIC_TIME_VSYSCALL | |
17 | bool | |
18 | ||
b5e498ad | 19 | # Timekeeping vsyscall support |
70639421 | 20 | config GENERIC_TIME_VSYSCALL_OLD |
b5e498ad TG |
21 | bool |
22 | ||
b5e498ad TG |
23 | # Old style timekeeping |
24 | config ARCH_USES_GETTIMEOFFSET | |
25 | bool | |
26 | ||
27 | # The generic clock events infrastructure | |
28 | config GENERIC_CLOCKEVENTS | |
29 | bool | |
30 | ||
764e0da1 TG |
31 | # Migration helper. Builds, but does not invoke |
32 | config GENERIC_CLOCKEVENTS_BUILD | |
33 | bool | |
34 | default y | |
35 | depends on GENERIC_CLOCKEVENTS | |
36 | ||
12ad1000 MR |
37 | # Architecture can handle broadcast in a driver-agnostic way |
38 | config ARCH_HAS_TICK_BROADCAST | |
39 | bool | |
40 | ||
b5e498ad TG |
41 | # Clockevents broadcasting infrastructure |
42 | config GENERIC_CLOCKEVENTS_BROADCAST | |
43 | bool | |
44 | depends on GENERIC_CLOCKEVENTS | |
45 | ||
764e0da1 TG |
46 | # Automatically adjust the min. reprogramming time for |
47 | # clock event device | |
48 | config GENERIC_CLOCKEVENTS_MIN_ADJUST | |
49 | bool | |
50 | ||
b5e498ad TG |
51 | # Generic update of CMOS clock |
52 | config GENERIC_CMOS_UPDATE | |
53 | bool | |
764e0da1 TG |
54 | |
55 | if GENERIC_CLOCKEVENTS | |
56 | menu "Timers subsystem" | |
57 | ||
3451d024 | 58 | # Core internal switch. Selected by NO_HZ_COMMON / HIGH_RES_TIMERS. This is |
764e0da1 TG |
59 | # only related to the tick functionality. Oneshot clockevent devices |
60 | # are supported independ of this. | |
61 | config TICK_ONESHOT | |
62 | bool | |
63 | ||
3451d024 FW |
64 | config NO_HZ_COMMON |
65 | bool | |
66 | depends on !ARCH_USES_GETTIMEOFFSET && GENERIC_CLOCKEVENTS | |
67 | select TICK_ONESHOT | |
68 | ||
3ca277e4 FW |
69 | choice |
70 | prompt "Timer tick handling" | |
71 | default NO_HZ_IDLE if NO_HZ | |
72 | ||
5b533f4f | 73 | config HZ_PERIODIC |
3ca277e4 FW |
74 | bool "Periodic timer ticks (constant rate, no dynticks)" |
75 | help | |
76 | This option keeps the tick running periodically at a constant | |
77 | rate, even when the CPU doesn't need it. | |
78 | ||
79 | config NO_HZ_IDLE | |
80 | bool "Idle dynticks system (tickless idle)" | |
764e0da1 | 81 | depends on !ARCH_USES_GETTIMEOFFSET && GENERIC_CLOCKEVENTS |
3451d024 | 82 | select NO_HZ_COMMON |
764e0da1 | 83 | help |
3ca277e4 FW |
84 | This option enables a tickless idle system: timer interrupts |
85 | will only trigger on an as-needed basis when the system is idle. | |
86 | This is usually interesting for energy saving. | |
87 | ||
88 | Most of the time you want to say Y here. | |
764e0da1 | 89 | |
c5bfece2 | 90 | config NO_HZ_FULL |
fae30dd6 | 91 | bool "Full dynticks system (tickless)" |
3451d024 | 92 | # NO_HZ_COMMON dependency |
ab71d36d | 93 | depends on !ARCH_USES_GETTIMEOFFSET && GENERIC_CLOCKEVENTS |
fae30dd6 FW |
94 | # We need at least one periodic CPU for timekeeping |
95 | depends on SMP | |
96 | # RCU_USER_QS dependency | |
97 | depends on HAVE_CONTEXT_TRACKING | |
c58b0df1 | 98 | # VIRT_CPU_ACCOUNTING_GEN dependency |
554b0004 | 99 | depends on HAVE_VIRT_CPU_ACCOUNTING_GEN |
3451d024 | 100 | select NO_HZ_COMMON |
ab71d36d FW |
101 | select RCU_USER_QS |
102 | select RCU_NOCB_CPU | |
c58b0df1 | 103 | select VIRT_CPU_ACCOUNTING_GEN |
76c24fb0 | 104 | select IRQ_WORK |
ab71d36d FW |
105 | help |
106 | Adaptively try to shutdown the tick whenever possible, even when | |
a831881b FW |
107 | the CPU is running tasks. Typically this requires running a single |
108 | task on the CPU. Chances for running tickless are maximized when | |
109 | the task mostly runs in userspace and has few kernel activity. | |
110 | ||
c5bfece2 | 111 | You need to fill up the nohz_full boot parameter with the |
a831881b FW |
112 | desired range of dynticks CPUs. |
113 | ||
114 | This is implemented at the expense of some overhead in user <-> kernel | |
115 | transitions: syscalls, exceptions and interrupts. Even when it's | |
116 | dynamically off. | |
117 | ||
118 | Say N. | |
119 | ||
3ca277e4 FW |
120 | endchoice |
121 | ||
f98823ac | 122 | config NO_HZ_FULL_ALL |
f96a34e2 | 123 | bool "Full dynticks system on all CPUs by default (except CPU 0)" |
f98823ac FW |
124 | depends on NO_HZ_FULL |
125 | help | |
126 | If the user doesn't pass the nohz_full boot option to | |
127 | define the range of full dynticks CPUs, consider that all | |
128 | CPUs in the system are full dynticks by default. | |
129 | Note the boot CPU will still be kept outside the range to | |
130 | handle the timekeeping duty. | |
131 | ||
b44379af PM |
132 | config NO_HZ_FULL_SYSIDLE |
133 | bool "Detect full-system idle state for full dynticks system" | |
134 | depends on NO_HZ_FULL | |
135 | default n | |
136 | help | |
137 | At least one CPU must keep the scheduling-clock tick running for | |
138 | timekeeping purposes whenever there is a non-idle CPU, where | |
139 | "non-idle" also includes dynticks CPUs as long as they are | |
140 | running non-idle tasks. Because the underlying adaptive-tick | |
141 | support cannot distinguish between all CPUs being idle and | |
142 | all CPUs each running a single task in dynticks mode, the | |
143 | underlying support simply ensures that there is always a CPU | |
144 | handling the scheduling-clock tick, whether or not all CPUs | |
145 | are idle. This Kconfig option enables scalable detection of | |
146 | the all-CPUs-idle state, thus allowing the scheduling-clock | |
147 | tick to be disabled when all CPUs are idle. Note that scalable | |
148 | detection of the all-CPUs-idle state means that larger systems | |
149 | will be slower to declare the all-CPUs-idle state. | |
150 | ||
151 | Say Y if you would like to help debug all-CPUs-idle detection. | |
152 | ||
153 | Say N if you are unsure. | |
154 | ||
0edd1b17 PM |
155 | config NO_HZ_FULL_SYSIDLE_SMALL |
156 | int "Number of CPUs above which large-system approach is used" | |
157 | depends on NO_HZ_FULL_SYSIDLE | |
158 | range 1 NR_CPUS | |
159 | default 8 | |
160 | help | |
161 | The full-system idle detection mechanism takes a lazy approach | |
162 | on large systems, as is required to attain decent scalability. | |
163 | However, on smaller systems, scalability is not anywhere near as | |
164 | large a concern as is energy efficiency. The sysidle subsystem | |
165 | therefore uses a fast but non-scalable algorithm for small | |
166 | systems and a lazier but scalable algorithm for large systems. | |
167 | This Kconfig parameter defines the number of CPUs in the largest | |
168 | system that will be considered to be "small". | |
169 | ||
170 | The default value will be fine in most cases. Battery-powered | |
171 | systems that (1) enable NO_HZ_FULL_SYSIDLE, (2) have larger | |
172 | numbers of CPUs, and (3) are suffering from battery-lifetime | |
173 | problems due to long sysidle latencies might wish to experiment | |
174 | with larger values for this Kconfig parameter. On the other | |
175 | hand, they might be even better served by disabling NO_HZ_FULL | |
176 | entirely, given that NO_HZ_FULL is intended for HPC and | |
177 | real-time workloads that at present do not tend to be run on | |
178 | battery-powered systems. | |
179 | ||
180 | Take the default if you are unsure. | |
181 | ||
0644ca5c FW |
182 | config NO_HZ |
183 | bool "Old Idle dynticks config" | |
184 | depends on !ARCH_USES_GETTIMEOFFSET && GENERIC_CLOCKEVENTS | |
185 | help | |
186 | This is the old config entry that enables dynticks idle. | |
187 | We keep it around for a little while to enforce backward | |
188 | compatibility with older config files. | |
189 | ||
764e0da1 TG |
190 | config HIGH_RES_TIMERS |
191 | bool "High Resolution Timer Support" | |
192 | depends on !ARCH_USES_GETTIMEOFFSET && GENERIC_CLOCKEVENTS | |
193 | select TICK_ONESHOT | |
194 | help | |
195 | This option enables high resolution timer support. If your | |
196 | hardware is not capable then this option only increases | |
197 | the size of the kernel image. | |
198 | ||
199 | endmenu | |
200 | endif |