Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: GPL-2.0-only
0002 #
0003 # Timer subsystem related configuration options
0004 #
0005 
0006 # Options selectable by arch Kconfig
0007 
0008 # Watchdog function for clocksources to detect instabilities
0009 config CLOCKSOURCE_WATCHDOG
0010         bool
0011 
0012 # Architecture has extra clocksource data
0013 config ARCH_CLOCKSOURCE_DATA
0014         bool
0015 
0016 # Architecture has extra clocksource init called from registration
0017 config ARCH_CLOCKSOURCE_INIT
0018         bool
0019 
0020 # Clocksources require validation of the clocksource against the last
0021 # cycle update - x86/TSC misfeature
0022 config CLOCKSOURCE_VALIDATE_LAST_CYCLE
0023         bool
0024 
0025 # Timekeeping vsyscall support
0026 config GENERIC_TIME_VSYSCALL
0027         bool
0028 
0029 # The generic clock events infrastructure
0030 config GENERIC_CLOCKEVENTS
0031         def_bool !LEGACY_TIMER_TICK
0032 
0033 # Architecture can handle broadcast in a driver-agnostic way
0034 config ARCH_HAS_TICK_BROADCAST
0035         bool
0036 
0037 # Clockevents broadcasting infrastructure
0038 config GENERIC_CLOCKEVENTS_BROADCAST
0039         bool
0040         depends on GENERIC_CLOCKEVENTS
0041 
0042 # Automatically adjust the min. reprogramming time for
0043 # clock event device
0044 config GENERIC_CLOCKEVENTS_MIN_ADJUST
0045         bool
0046 
0047 # Generic update of CMOS clock
0048 config GENERIC_CMOS_UPDATE
0049         bool
0050 
0051 # Select to handle posix CPU timers from task_work
0052 # and not from the timer interrupt context
0053 config HAVE_POSIX_CPU_TIMERS_TASK_WORK
0054         bool
0055 
0056 config POSIX_CPU_TIMERS_TASK_WORK
0057         bool
0058         default y if POSIX_TIMERS && HAVE_POSIX_CPU_TIMERS_TASK_WORK
0059 
0060 config LEGACY_TIMER_TICK
0061         bool
0062         help
0063           The legacy timer tick helper is used by platforms that
0064           lack support for the generic clockevent framework.
0065           New platforms should use generic clockevents instead.
0066 
0067 config TIME_KUNIT_TEST
0068         tristate "KUnit test for kernel/time functions" if !KUNIT_ALL_TESTS
0069         depends on KUNIT
0070         default KUNIT_ALL_TESTS
0071         help
0072           Enable this option to test RTC library functions.
0073 
0074           If unsure, say N.
0075 
0076 config CONTEXT_TRACKING
0077         bool
0078 
0079 config CONTEXT_TRACKING_IDLE
0080         bool
0081         select CONTEXT_TRACKING
0082         help
0083           Tracks idle state on behalf of RCU.
0084 
0085 if GENERIC_CLOCKEVENTS
0086 menu "Timers subsystem"
0087 
0088 # Core internal switch. Selected by NO_HZ_COMMON / HIGH_RES_TIMERS. This is
0089 # only related to the tick functionality. Oneshot clockevent devices
0090 # are supported independent of this.
0091 config TICK_ONESHOT
0092         bool
0093 
0094 config NO_HZ_COMMON
0095         bool
0096         select TICK_ONESHOT
0097 
0098 choice
0099         prompt "Timer tick handling"
0100         default NO_HZ_IDLE if NO_HZ
0101 
0102 config HZ_PERIODIC
0103         bool "Periodic timer ticks (constant rate, no dynticks)"
0104         help
0105           This option keeps the tick running periodically at a constant
0106           rate, even when the CPU doesn't need it.
0107 
0108 config NO_HZ_IDLE
0109         bool "Idle dynticks system (tickless idle)"
0110         select NO_HZ_COMMON
0111         help
0112           This option enables a tickless idle system: timer interrupts
0113           will only trigger on an as-needed basis when the system is idle.
0114           This is usually interesting for energy saving.
0115 
0116           Most of the time you want to say Y here.
0117 
0118 config NO_HZ_FULL
0119         bool "Full dynticks system (tickless)"
0120         # NO_HZ_COMMON dependency
0121         # We need at least one periodic CPU for timekeeping
0122         depends on SMP
0123         depends on HAVE_CONTEXT_TRACKING_USER
0124         # VIRT_CPU_ACCOUNTING_GEN dependency
0125         depends on HAVE_VIRT_CPU_ACCOUNTING_GEN
0126         select NO_HZ_COMMON
0127         select RCU_NOCB_CPU
0128         select VIRT_CPU_ACCOUNTING_GEN
0129         select IRQ_WORK
0130         select CPU_ISOLATION
0131         help
0132          Adaptively try to shutdown the tick whenever possible, even when
0133          the CPU is running tasks. Typically this requires running a single
0134          task on the CPU. Chances for running tickless are maximized when
0135          the task mostly runs in userspace and has few kernel activity.
0136 
0137          You need to fill up the nohz_full boot parameter with the
0138          desired range of dynticks CPUs to use it. This is implemented at
0139          the expense of some overhead in user <-> kernel transitions:
0140          syscalls, exceptions and interrupts.
0141 
0142          By default, without passing the nohz_full parameter, this behaves just
0143          like NO_HZ_IDLE.
0144 
0145          If you're a distro say Y.
0146 
0147 endchoice
0148 
0149 config CONTEXT_TRACKING_USER
0150         bool
0151         depends on HAVE_CONTEXT_TRACKING_USER
0152         select CONTEXT_TRACKING
0153         help
0154           Track transitions between kernel and user on behalf of RCU and
0155           tickless cputime accounting. The former case relies on context
0156           tracking to enter/exit RCU extended quiescent states.
0157 
0158 config CONTEXT_TRACKING_USER_FORCE
0159         bool "Force user context tracking"
0160         depends on CONTEXT_TRACKING_USER
0161         default y if !NO_HZ_FULL
0162         help
0163           The major pre-requirement for full dynticks to work is to
0164           support the user context tracking subsystem. But there are also
0165           other dependencies to provide in order to make the full
0166           dynticks working.
0167 
0168           This option stands for testing when an arch implements the
0169           user context tracking backend but doesn't yet fulfill all the
0170           requirements to make the full dynticks feature working.
0171           Without the full dynticks, there is no way to test the support
0172           for user context tracking and the subsystems that rely on it: RCU
0173           userspace extended quiescent state and tickless cputime
0174           accounting. This option copes with the absence of the full
0175           dynticks subsystem by forcing the user context tracking on all
0176           CPUs in the system.
0177 
0178           Say Y only if you're working on the development of an
0179           architecture backend for the user context tracking.
0180 
0181           Say N otherwise, this option brings an overhead that you
0182           don't want in production.
0183 
0184 config NO_HZ
0185         bool "Old Idle dynticks config"
0186         help
0187           This is the old config entry that enables dynticks idle.
0188           We keep it around for a little while to enforce backward
0189           compatibility with older config files.
0190 
0191 config HIGH_RES_TIMERS
0192         bool "High Resolution Timer Support"
0193         select TICK_ONESHOT
0194         help
0195           This option enables high resolution timer support. If your
0196           hardware is not capable then this option only increases
0197           the size of the kernel image.
0198 
0199 config CLOCKSOURCE_WATCHDOG_MAX_SKEW_US
0200         int "Clocksource watchdog maximum allowable skew (in μs)"
0201         depends on CLOCKSOURCE_WATCHDOG
0202         range 50 1000
0203         default 100
0204         help
0205           Specify the maximum amount of allowable watchdog skew in
0206           microseconds before reporting the clocksource to be unstable.
0207 
0208 endmenu
0209 endif