xref: /openbmc/linux/kernel/time/Kconfig (revision 68198dca)
1#
2# Timer subsystem related configuration options
3#
4
5# Options selectable by arch Kconfig
6
7# Watchdog function for clocksources to detect instabilities
8config CLOCKSOURCE_WATCHDOG
9	bool
10
11# Architecture has extra clocksource data
12config ARCH_CLOCKSOURCE_DATA
13	bool
14
15# Clocksources require validation of the clocksource against the last
16# cycle update - x86/TSC misfeature
17config CLOCKSOURCE_VALIDATE_LAST_CYCLE
18	bool
19
20# Timekeeping vsyscall support
21config GENERIC_TIME_VSYSCALL
22	bool
23
24# Old style timekeeping
25config ARCH_USES_GETTIMEOFFSET
26	bool
27
28# The generic clock events infrastructure
29config GENERIC_CLOCKEVENTS
30	bool
31
32# Architecture can handle broadcast in a driver-agnostic way
33config ARCH_HAS_TICK_BROADCAST
34	bool
35
36# Clockevents broadcasting infrastructure
37config GENERIC_CLOCKEVENTS_BROADCAST
38	bool
39	depends on GENERIC_CLOCKEVENTS
40
41# Automatically adjust the min. reprogramming time for
42# clock event device
43config GENERIC_CLOCKEVENTS_MIN_ADJUST
44	bool
45
46# Generic update of CMOS clock
47config GENERIC_CMOS_UPDATE
48	bool
49
50if GENERIC_CLOCKEVENTS
51menu "Timers subsystem"
52
53# Core internal switch. Selected by NO_HZ_COMMON / HIGH_RES_TIMERS. This is
54# only related to the tick functionality. Oneshot clockevent devices
55# are supported independent of this.
56config TICK_ONESHOT
57	bool
58
59config NO_HZ_COMMON
60	bool
61	depends on !ARCH_USES_GETTIMEOFFSET && GENERIC_CLOCKEVENTS
62	select TICK_ONESHOT
63
64choice
65	prompt "Timer tick handling"
66	default NO_HZ_IDLE if NO_HZ
67
68config HZ_PERIODIC
69	bool "Periodic timer ticks (constant rate, no dynticks)"
70	help
71	  This option keeps the tick running periodically at a constant
72	  rate, even when the CPU doesn't need it.
73
74config NO_HZ_IDLE
75	bool "Idle dynticks system (tickless idle)"
76	depends on !ARCH_USES_GETTIMEOFFSET && GENERIC_CLOCKEVENTS
77	select NO_HZ_COMMON
78	help
79	  This option enables a tickless idle system: timer interrupts
80	  will only trigger on an as-needed basis when the system is idle.
81	  This is usually interesting for energy saving.
82
83	  Most of the time you want to say Y here.
84
85config NO_HZ_FULL
86	bool "Full dynticks system (tickless)"
87	# NO_HZ_COMMON dependency
88	depends on !ARCH_USES_GETTIMEOFFSET && GENERIC_CLOCKEVENTS
89	# We need at least one periodic CPU for timekeeping
90	depends on SMP
91	depends on HAVE_CONTEXT_TRACKING
92	# VIRT_CPU_ACCOUNTING_GEN dependency
93	depends on HAVE_VIRT_CPU_ACCOUNTING_GEN
94	select NO_HZ_COMMON
95	select RCU_NOCB_CPU
96	select VIRT_CPU_ACCOUNTING_GEN
97	select IRQ_WORK
98	help
99	 Adaptively try to shutdown the tick whenever possible, even when
100	 the CPU is running tasks. Typically this requires running a single
101	 task on the CPU. Chances for running tickless are maximized when
102	 the task mostly runs in userspace and has few kernel activity.
103
104	 You need to fill up the nohz_full boot parameter with the
105	 desired range of dynticks CPUs.
106
107	 This is implemented at the expense of some overhead in user <-> kernel
108	 transitions: syscalls, exceptions and interrupts. Even when it's
109	 dynamically off.
110
111	 Say N.
112
113endchoice
114
115config NO_HZ_FULL_ALL
116       bool "Full dynticks system on all CPUs by default (except CPU 0)"
117       depends on NO_HZ_FULL
118       help
119         If the user doesn't pass the nohz_full boot option to
120	 define the range of full dynticks CPUs, consider that all
121	 CPUs in the system are full dynticks by default.
122	 Note the boot CPU will still be kept outside the range to
123	 handle the timekeeping duty.
124
125config NO_HZ
126	bool "Old Idle dynticks config"
127	depends on !ARCH_USES_GETTIMEOFFSET && GENERIC_CLOCKEVENTS
128	help
129	  This is the old config entry that enables dynticks idle.
130	  We keep it around for a little while to enforce backward
131	  compatibility with older config files.
132
133config HIGH_RES_TIMERS
134	bool "High Resolution Timer Support"
135	depends on !ARCH_USES_GETTIMEOFFSET && GENERIC_CLOCKEVENTS
136	select TICK_ONESHOT
137	help
138	  This option enables high resolution timer support. If your
139	  hardware is not capable then this option only increases
140	  the size of the kernel image.
141
142endmenu
143endif
144