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

docs: timers: convert docs to ReST and rename to *.rst

The conversion here is really trivial: just a bunch of title
markups and very few puntual changes is enough to make it to
be parsed by Sphinx and generate a nice html.

The conversion is actually:
- add blank lines and identation in order to identify paragraphs;
- fix tables markups;
- add some lists markups;
- mark literal blocks;
- adjust title markups.

At its new index.rst, let's add a :orphan: while this is not linked to
the main index.rst file, in order to avoid build warnings.

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>

authored by

Mauro Carvalho Chehab and committed by
Jonathan Corbet
458f69ef 4ca9bc22

+84 -43
+24 -16
Documentation/timers/NO_HZ.txt Documentation/timers/no_hz.rst
··· 1 - NO_HZ: Reducing Scheduling-Clock Ticks 1 + ====================================== 2 + NO_HZ: Reducing Scheduling-Clock Ticks 3 + ====================================== 2 4 3 5 4 6 This document describes Kconfig options and boot parameters that can ··· 30 28 discussing testing, and a fifth and final section listing known issues. 31 29 32 30 33 - NEVER OMIT SCHEDULING-CLOCK TICKS 31 + Never Omit Scheduling-Clock Ticks 32 + ================================= 34 33 35 34 Very old versions of Linux from the 1990s and the very early 2000s 36 35 are incapable of omitting scheduling-clock ticks. It turns out that ··· 62 59 you should read the following two sections. 63 60 64 61 65 - OMIT SCHEDULING-CLOCK TICKS FOR IDLE CPUs 62 + Omit Scheduling-Clock Ticks For Idle CPUs 63 + ========================================= 66 64 67 65 If a CPU is idle, there is little point in sending it a scheduling-clock 68 66 interrupt. After all, the primary purpose of a scheduling-clock interrupt ··· 101 97 dyntick-idle mode. 102 98 103 99 104 - OMIT SCHEDULING-CLOCK TICKS FOR CPUs WITH ONLY ONE RUNNABLE TASK 100 + Omit Scheduling-Clock Ticks For CPUs With Only One Runnable Task 101 + ================================================================ 105 102 106 103 If a CPU has only one runnable task, there is little point in sending it 107 104 a scheduling-clock interrupt because there is no other task to switch to. ··· 179 174 (yet) be enabled by default. 180 175 181 176 182 - RCU IMPLICATIONS 177 + RCU Implications 178 + ================ 183 179 184 180 There are situations in which idle CPUs cannot be permitted to 185 181 enter either dyntick-idle mode or adaptive-tick mode, the most ··· 205 199 where you want them to run. 206 200 207 201 208 - TESTING 202 + Testing 203 + ======= 209 204 210 205 So you enable all the OS-jitter features described in this document, 211 206 but do not see any change in your workload's behavior. Is this because ··· 229 222 systems. 230 223 231 224 232 - KNOWN ISSUES 225 + Known Issues 226 + ============ 233 227 234 - o Dyntick-idle slows transitions to and from idle slightly. 228 + * Dyntick-idle slows transitions to and from idle slightly. 235 229 In practice, this has not been a problem except for the most 236 230 aggressive real-time workloads, which have the option of disabling 237 231 dyntick-idle mode, an option that most of them take. However, ··· 256 248 this parameter effectively disables Turbo Mode on Intel 257 249 CPUs, which can significantly reduce maximum performance. 258 250 259 - o Adaptive-ticks slows user/kernel transitions slightly. 251 + * Adaptive-ticks slows user/kernel transitions slightly. 260 252 This is not expected to be a problem for computationally intensive 261 253 workloads, which have few such transitions. Careful benchmarking 262 254 will be required to determine whether or not other workloads 263 255 are significantly affected by this effect. 264 256 265 - o Adaptive-ticks does not do anything unless there is only one 257 + * Adaptive-ticks does not do anything unless there is only one 266 258 runnable task for a given CPU, even though there are a number 267 259 of other situations where the scheduling-clock tick is not 268 260 needed. To give but one example, consider a CPU that has one ··· 283 275 284 276 Better handling of these sorts of situations is future work. 285 277 286 - o A reboot is required to reconfigure both adaptive idle and RCU 278 + * A reboot is required to reconfigure both adaptive idle and RCU 287 279 callback offloading. Runtime reconfiguration could be provided 288 280 if needed, however, due to the complexity of reconfiguring RCU at 289 281 runtime, there would need to be an earthshakingly good reason. ··· 291 283 simply offloading RCU callbacks from all CPUs and pinning them 292 284 where you want them whenever you want them pinned. 293 285 294 - o Additional configuration is required to deal with other sources 286 + * Additional configuration is required to deal with other sources 295 287 of OS jitter, including interrupts and system-utility tasks 296 288 and processes. This configuration normally involves binding 297 289 interrupts and tasks to particular CPUs. 298 290 299 - o Some sources of OS jitter can currently be eliminated only by 291 + * Some sources of OS jitter can currently be eliminated only by 300 292 constraining the workload. For example, the only way to eliminate 301 293 OS jitter due to global TLB shootdowns is to avoid the unmapping 302 294 operations (such as kernel module unload operations) that ··· 307 299 helpful, especially when combined with the mlock() and mlockall() 308 300 system calls. 309 301 310 - o Unless all CPUs are idle, at least one CPU must keep the 302 + * Unless all CPUs are idle, at least one CPU must keep the 311 303 scheduling-clock interrupt going in order to support accurate 312 304 timekeeping. 313 305 314 - o If there might potentially be some adaptive-ticks CPUs, there 306 + * If there might potentially be some adaptive-ticks CPUs, there 315 307 will be at least one CPU keeping the scheduling-clock interrupt 316 308 going, even if all CPUs are otherwise idle. 317 309 318 310 Better handling of this situation is ongoing work. 319 311 320 - o Some process-handling operations still require the occasional 312 + * Some process-handling operations still require the occasional 321 313 scheduling-clock tick. These operations include calculating CPU 322 314 load, maintaining sched average, computing CFS entity vruntime, 323 315 computing avenrun, and carrying out load balancing. They are
+7 -6
Documentation/timers/highres.txt Documentation/timers/highres.rst
··· 1 + ===================================================== 1 2 High resolution timers and dynamic ticks design notes 2 - ----------------------------------------------------- 3 + ===================================================== 3 4 4 5 Further information can be found in the paper of the OLS 2006 talk "hrtimers 5 6 and beyond". The paper is part of the OLS 2006 Proceedings Volume 1, which can ··· 31 30 --------------------------- 32 31 33 32 The hrtimer base infrastructure was merged into the 2.6.16 kernel. Details of 34 - the base implementation are covered in Documentation/timers/hrtimers.txt. See 33 + the base implementation are covered in Documentation/timers/hrtimers.rst. See 35 34 also figure #2 (OLS slides p. 15) 36 35 37 36 The main differences to the timer wheel, which holds the armed timer_list type 38 37 timers are: 38 + 39 39 - time ordered enqueueing into a rb-tree 40 40 - independent of ticks (the processing is based on nanoseconds) 41 41 ··· 57 55 58 56 Further information about the Generic Time Of Day framework is available in the 59 57 OLS 2005 Proceedings Volume 1: 60 - http://www.linuxsymposium.org/2005/linuxsymposium_procv1.pdf 58 + 59 + http://www.linuxsymposium.org/2005/linuxsymposium_procv1.pdf 61 60 62 61 The paper "We Are Not Getting Any Younger: A New Approach to Time and 63 62 Timers" was written by J. Stultz, D.V. Hart, & N. Aravamudan. ··· 103 100 104 101 The management layer assigns one or more of the following functions to a clock 105 102 event device: 103 + 106 104 - system global periodic tick (jiffies update) 107 105 - cpu local update_process_times 108 106 - cpu local profiling ··· 248 244 available for MIPS and PowerPC. 249 245 250 246 Thomas, Ingo 251 - 252 - 253 -
+3 -1
Documentation/timers/hpet.txt Documentation/timers/hpet.rst
··· 1 - High Precision Event Timer Driver for Linux 1 + =========================================== 2 + High Precision Event Timer Driver for Linux 3 + =========================================== 2 4 3 5 The High Precision Event Timer (HPET) hardware follows a specification 4 6 by Intel and Microsoft, revision 1.
+3 -3
Documentation/timers/hrtimers.txt Documentation/timers/hrtimers.rst
··· 1 - 1 + ====================================================== 2 2 hrtimers - subsystem for high-resolution kernel timers 3 - ---------------------------------------------------- 3 + ====================================================== 4 4 5 5 This patch introduces a new subsystem for high-resolution kernel timers. 6 6 ··· 146 146 a given clock has - be it low-res, high-res, or artificially-low-res. 147 147 148 148 hrtimers - testing and verification 149 - ---------------------------------- 149 + ----------------------------------- 150 150 151 151 We used the high-resolution clock subsystem ontop of hrtimers to verify 152 152 the hrtimer implementation details in praxis, and we also ran the posix
+22
Documentation/timers/index.rst
··· 1 + :orphan: 2 + 3 + ====== 4 + timers 5 + ====== 6 + 7 + .. toctree:: 8 + :maxdepth: 1 9 + 10 + highres 11 + hpet 12 + hrtimers 13 + no_hz 14 + timekeeping 15 + timers-howto 16 + 17 + .. only:: subproject and html 18 + 19 + Indices 20 + ======= 21 + 22 + * :ref:`genindex`
+2 -1
Documentation/timers/timekeeping.txt Documentation/timers/timekeeping.rst
··· 1 + =========================================================== 1 2 Clock sources, Clock events, sched_clock() and delay timers 2 - ----------------------------------------------------------- 3 + =========================================================== 3 4 4 5 This document tries to briefly explain some basic kernel timekeeping 5 6 abstractions. It partly pertains to the drivers usually found in
+11 -4
Documentation/timers/timers-howto.txt Documentation/timers/timers-howto.rst
··· 1 + =================================================================== 1 2 delays - Information on the various kernel delay / sleep mechanisms 2 - ------------------------------------------------------------------- 3 + =================================================================== 3 4 4 5 This document seeks to answer the common question: "What is the 5 6 RightWay (TM) to insert a delay?" ··· 18 17 it really need to delay in atomic context?" If so... 19 18 20 19 ATOMIC CONTEXT: 21 - You must use the *delay family of functions. These 20 + You must use the `*delay` family of functions. These 22 21 functions use the jiffie estimation of clock speed 23 22 and will busy wait for enough loop cycles to achieve 24 23 the desired delay: ··· 36 35 be refactored to allow for the use of msleep. 37 36 38 37 NON-ATOMIC CONTEXT: 39 - You should use the *sleep[_range] family of functions. 38 + You should use the `*sleep[_range]` family of functions. 40 39 There are a few more options here, while any of them may 41 40 work correctly, using the "right" sleep function will 42 41 help the scheduler, power management, and just make your 43 42 driver better :) 44 43 45 44 -- Backed by busy-wait loop: 45 + 46 46 udelay(unsigned long usecs) 47 + 47 48 -- Backed by hrtimers: 49 + 48 50 usleep_range(unsigned long min, unsigned long max) 51 + 49 52 -- Backed by jiffies / legacy_timers 53 + 50 54 msleep(unsigned long msecs) 51 55 msleep_interruptible(unsigned long msecs) 52 56 53 - Unlike the *delay family, the underlying mechanism 57 + Unlike the `*delay` family, the underlying mechanism 54 58 driving each of these calls varies, thus there are 55 59 quirks you should be aware of. 56 60 ··· 76 70 - Why not msleep for (1ms - 20ms)? 77 71 Explained originally here: 78 72 http://lkml.org/lkml/2007/8/3/250 73 + 79 74 msleep(1~20) may not do what the caller intends, and 80 75 will often sleep longer (~20 ms actual sleep for any 81 76 value given in the 1~20ms range). In many cases this
+1 -1
MAINTAINERS
··· 7192 7192 HPET: High Precision Event Timers driver 7193 7193 M: Clemens Ladisch <clemens@ladisch.de> 7194 7194 S: Maintained 7195 - F: Documentation/timers/hpet.txt 7195 + F: Documentation/timers/hpet.rst 7196 7196 F: drivers/char/hpet.c 7197 7197 F: include/linux/hpet.h 7198 7198 F: include/uapi/linux/hpet.h
+1 -1
drivers/media/usb/dvb-usb-v2/anysee.c
··· 56 56 /* TODO FIXME: dvb_usb_generic_rw() fails rarely with error code -32 57 57 * (EPIPE, Broken pipe). Function supports currently msleep() as a 58 58 * parameter but I would not like to use it, since according to 59 - * Documentation/timers/timers-howto.txt it should not be used such 59 + * Documentation/timers/timers-howto.rst it should not be used such 60 60 * short, under < 20ms, sleeps. Repeating failed message would be 61 61 * better choice as not to add unwanted delays... 62 62 * Fixing that correctly is one of those or both;
+1 -1
drivers/regulator/core.c
··· 2304 2304 * 2305 2305 * Delay for the requested amount of time as per the guidelines in: 2306 2306 * 2307 - * Documentation/timers/timers-howto.txt 2307 + * Documentation/timers/timers-howto.rst 2308 2308 * 2309 2309 * The assumption here is that regulators will never be enabled in 2310 2310 * atomic context and therefore sleeping functions can be used.
+2 -2
include/linux/iopoll.h
··· 21 21 * @cond: Break condition (usually involving @val) 22 22 * @sleep_us: Maximum time to sleep between reads in us (0 23 23 * tight-loops). Should be less than ~20ms since usleep_range 24 - * is used (see Documentation/timers/timers-howto.txt). 24 + * is used (see Documentation/timers/timers-howto.rst). 25 25 * @timeout_us: Timeout in us, 0 means never timeout 26 26 * 27 27 * Returns 0 on success and -ETIMEDOUT upon a timeout. In either ··· 60 60 * @cond: Break condition (usually involving @val) 61 61 * @delay_us: Time to udelay between reads in us (0 tight-loops). Should 62 62 * be less than ~10us since udelay is used (see 63 - * Documentation/timers/timers-howto.txt). 63 + * Documentation/timers/timers-howto.rst). 64 64 * @timeout_us: Timeout in us, 0 means never timeout 65 65 * 66 66 * Returns 0 on success and -ETIMEDOUT upon a timeout. In either
+2 -2
include/linux/regmap.h
··· 112 112 * @cond: Break condition (usually involving @val) 113 113 * @sleep_us: Maximum time to sleep between reads in us (0 114 114 * tight-loops). Should be less than ~20ms since usleep_range 115 - * is used (see Documentation/timers/timers-howto.txt). 115 + * is used (see Documentation/timers/timers-howto.rst). 116 116 * @timeout_us: Timeout in us, 0 means never timeout 117 117 * 118 118 * Returns 0 on success and -ETIMEDOUT upon a timeout or the regmap_read ··· 154 154 * @cond: Break condition (usually involving @val) 155 155 * @sleep_us: Maximum time to sleep between reads in us (0 156 156 * tight-loops). Should be less than ~20ms since usleep_range 157 - * is used (see Documentation/timers/timers-howto.txt). 157 + * is used (see Documentation/timers/timers-howto.rst). 158 158 * @timeout_us: Timeout in us, 0 means never timeout 159 159 * 160 160 * Returns 0 on success and -ETIMEDOUT upon a timeout or the regmap_field_read
+4 -4
scripts/checkpatch.pl
··· 5712 5712 # ignore udelay's < 10, however 5713 5713 if (! ($delay < 10) ) { 5714 5714 CHK("USLEEP_RANGE", 5715 - "usleep_range is preferred over udelay; see Documentation/timers/timers-howto.txt\n" . $herecurr); 5715 + "usleep_range is preferred over udelay; see Documentation/timers/timers-howto.rst\n" . $herecurr); 5716 5716 } 5717 5717 if ($delay > 2000) { 5718 5718 WARN("LONG_UDELAY", ··· 5724 5724 if ($line =~ /\bmsleep\s*\((\d+)\);/) { 5725 5725 if ($1 < 20) { 5726 5726 WARN("MSLEEP", 5727 - "msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt\n" . $herecurr); 5727 + "msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.rst\n" . $herecurr); 5728 5728 } 5729 5729 } 5730 5730 ··· 6115 6115 my $max = $7; 6116 6116 if ($min eq $max) { 6117 6117 WARN("USLEEP_RANGE", 6118 - "usleep_range should not use min == max args; see Documentation/timers/timers-howto.txt\n" . "$here\n$stat\n"); 6118 + "usleep_range should not use min == max args; see Documentation/timers/timers-howto.rst\n" . "$here\n$stat\n"); 6119 6119 } elsif ($min =~ /^\d+$/ && $max =~ /^\d+$/ && 6120 6120 $min > $max) { 6121 6121 WARN("USLEEP_RANGE", 6122 - "usleep_range args reversed, use min then max; see Documentation/timers/timers-howto.txt\n" . "$here\n$stat\n"); 6122 + "usleep_range args reversed, use min then max; see Documentation/timers/timers-howto.rst\n" . "$here\n$stat\n"); 6123 6123 } 6124 6124 } 6125 6125
+1 -1
sound/soc/sof/ops.h
··· 349 349 * @cond: Break condition (usually involving @val) 350 350 * @sleep_us: Maximum time to sleep between reads in us (0 351 351 * tight-loops). Should be less than ~20ms since usleep_range 352 - * is used (see Documentation/timers/timers-howto.txt). 352 + * is used (see Documentation/timers/timers-howto.rst). 353 353 * @timeout_us: Timeout in us, 0 means never timeout 354 354 * 355 355 * Returns 0 on success and -ETIMEDOUT upon a timeout. In either