History

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.

Mauro Carvalho Chehab committed 7 years ago

Commit 458f69e1 parent 4ca9bc214 files · +84 −43Browse files

Unified · Split

14 files
  1. Documentation/timers/highres.rst +7 −6
  2. Documentation/timers/hpet.rst +3 −1
  3. Documentation/timers/hrtimers.rst +3 −3
  4. Documentation/timers/index.rst +22 −0
  5. Documentation/timers/no_hz.rst +24 −16
  6. Documentation/timers/timekeeping.rst +2 −1
  7. Documentation/timers/timers-howto.rst +11 −4
  8. MAINTAINERS +1 −1
  9. drivers/media/usb/dvb-usb-v2/anysee.c +1 −1
  10. drivers/regulator/core.c +1 −1
  11. include/linux/iopoll.h +2 −2
  12. include/linux/regmap.h +2 −2
  13. scripts/checkpatch.pl +4 −4
  14. sound/soc/sof/ops.h +1 −1
Documentation/timers/highres.rstrenamed from Documentation/timers/highres.txt+7−6
@@ -1,5 +1,6 @@
1+=====================================================
12 High resolution timers and dynamic ticks design notes
2−-----------------------------------------------------
3+=====================================================
34
45 Further information can be found in the paper of the OLS 2006 talk "hrtimers
56 and beyond". The paper is part of the OLS 2006 Proceedings Volume 1, which can
@@ -30,11 +31,12 @@ hrtimer base infrastructure · 24 unmodified lines
3031 ---------------------------
3132
3233 The hrtimer base infrastructure was merged into the 2.6.16 kernel. Details of
33−the base implementation are covered in Documentation/timers/hrtimers.txt. See
34+the base implementation are covered in Documentation/timers/hrtimers.rst. See
3435 also figure #2 (OLS slides p. 15)
3536
3637 The main differences to the timer wheel, which holds the armed timer_list type
3738 timers are:
39+
3840 - time ordered enqueueing into a rb-tree
3941 - independent of ticks (the processing is based on nanoseconds)
4042
@@ -55,7 +57,8 @@ merged into the 2.6.18 kernel. · 14 unmodified lines
5557
5658 Further information about the Generic Time Of Day framework is available in the
5759 OLS 2005 Proceedings Volume 1:
58−http://www.linuxsymposium.org/2005/linuxsymposium_procv1.pdf
60+
61+ http://www.linuxsymposium.org/2005/linuxsymposium_procv1.pdf
5962
6063 The paper "We Are Not Getting Any Younger: A New Approach to Time and
6164 Timers" was written by J. Stultz, D.V. Hart, & N. Aravamudan.
@@ -100,6 +103,7 @@ accounting, profiling, and high resolution timers. · 38 unmodified lines
100103
101104 The management layer assigns one or more of the following functions to a clock
102105 event device:
106+
103107 - system global periodic tick (jiffies update)
104108 - cpu local update_process_times
105109 - cpu local profiling
@@ -244,6 +248,3 @@ extended to x86_64 and ARM already. Initial (work in progress) support is also · 138 unmodified lines
244248 available for MIPS and PowerPC.
245249
246250 Thomas, Ingo
247−
248−
249−
Documentation/timers/hpet.rstrenamed from Documentation/timers/hpet.txt+3−1
@@ -1,4 +1,6 @@
1− High Precision Event Timer Driver for Linux
1+===========================================
2+High Precision Event Timer Driver for Linux
3+===========================================
24
35 The High Precision Event Timer (HPET) hardware follows a specification
46 by Intel and Microsoft, revision 1.
Documentation/timers/hrtimers.rstrenamed from Documentation/timers/hrtimers.txt+3−3
@@ -1,6 +1,6 @@
1−
1+======================================================
22 hrtimers - subsystem for high-resolution kernel timers
3−----------------------------------------------------
3+======================================================
44
55 This patch introduces a new subsystem for high-resolution kernel timers.
66
@@ -146,7 +146,7 @@ the clock_getres() interface. This will return whatever real resolution · 139 unmodified lines
146146 a given clock has - be it low-res, high-res, or artificially-low-res.
147147
148148 hrtimers - testing and verification
149−----------------------------------
149+-----------------------------------
150150
151151 We used the high-resolution clock subsystem ontop of hrtimers to verify
152152 the hrtimer implementation details in praxis, and we also ran the posix
Documentation/timers/index.rst+22−0
@@ -0,0 +1,22 @@
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`
Documentation/timers/no_hz.rstrenamed from Documentation/timers/NO_HZ.txt+24−16
@@ -1,4 +1,6 @@
1− NO_HZ: Reducing Scheduling-Clock Ticks
1+======================================
2+NO_HZ: Reducing Scheduling-Clock Ticks
3+======================================
24
35
46 This document describes Kconfig options and boot parameters that can
@@ -28,7 +30,8 @@ by a third section on RCU-specific considerations, a fourth section · 23 unmodified lines
2830 discussing testing, and a fifth and final section listing known issues.
2931
3032
31−NEVER OMIT SCHEDULING-CLOCK TICKS
33+Never Omit Scheduling-Clock Ticks
34+=================================
3235
3336 Very old versions of Linux from the 1990s and the very early 2000s
3437 are incapable of omitting scheduling-clock ticks. It turns out that
@@ -59,7 +62,8 @@ degrade your applications performance. If this describes your workload, · 24 unmodified lines
5962 you should read the following two sections.
6063
6164
62−OMIT SCHEDULING-CLOCK TICKS FOR IDLE CPUs
65+Omit Scheduling-Clock Ticks For Idle CPUs
66+=========================================
6367
6468 If a CPU is idle, there is little point in sending it a scheduling-clock
6569 interrupt. After all, the primary purpose of a scheduling-clock interrupt
@@ -97,7 +101,8 @@ By default, CONFIG_NO_HZ_IDLE=y kernels boot with "nohz=on", enabling · 31 unmodified lines
97101 dyntick-idle mode.
98102
99103
100−OMIT SCHEDULING-CLOCK TICKS FOR CPUs WITH ONLY ONE RUNNABLE TASK
104+Omit Scheduling-Clock Ticks For CPUs With Only One Runnable Task
105+================================================================
101106
102107 If a CPU has only one runnable task, there is little point in sending it
103108 a scheduling-clock interrupt because there is no other task to switch to.
@@ -174,7 +179,8 @@ However, the drawbacks listed above mean that adaptive ticks should not · 70 unmodified lines
174179 (yet) be enabled by default.
175180
176181
177−RCU IMPLICATIONS
182+RCU Implications
183+================
178184
179185 There are situations in which idle CPUs cannot be permitted to
180186 enter either dyntick-idle mode or adaptive-tick mode, the most
@@ -199,7 +205,8 @@ scheduler will decide where to run them, which might or might not be · 18 unmodified lines
199205 where you want them to run.
200206
201207
202−TESTING
208+Testing
209+=======
203210
204211 So you enable all the OS-jitter features described in this document,
205212 but do not see any change in your workload's behavior. Is this because
@@ -222,9 +229,10 @@ We do not currently have a good way to remove OS jitter from single-CPU · 16 unmodified lines
222229 systems.
223230
224231
225−KNOWN ISSUES
232+Known Issues
233+============
226234
227−o Dyntick-idle slows transitions to and from idle slightly.
235+* Dyntick-idle slows transitions to and from idle slightly.
228236 In practice, this has not been a problem except for the most
229237 aggressive real-time workloads, which have the option of disabling
230238 dyntick-idle mode, an option that most of them take. However,
@@ -248,13 +256,13 @@ o Dyntick-idle slows transitions to and from idle slightly. · 17 unmodified lines
248256 this parameter effectively disables Turbo Mode on Intel
249257 CPUs, which can significantly reduce maximum performance.
250258
251−o Adaptive-ticks slows user/kernel transitions slightly.
259+* Adaptive-ticks slows user/kernel transitions slightly.
252260 This is not expected to be a problem for computationally intensive
253261 workloads, which have few such transitions. Careful benchmarking
254262 will be required to determine whether or not other workloads
255263 are significantly affected by this effect.
256264
257−o Adaptive-ticks does not do anything unless there is only one
265+* Adaptive-ticks does not do anything unless there is only one
258266 runnable task for a given CPU, even though there are a number
259267 of other situations where the scheduling-clock tick is not
260268 needed. To give but one example, consider a CPU that has one
@@ -275,7 +283,7 @@ o Adaptive-ticks does not do anything unless there is only one · 14 unmodified lines
275283
276284 Better handling of these sorts of situations is future work.
277285
278−o A reboot is required to reconfigure both adaptive idle and RCU
286+* A reboot is required to reconfigure both adaptive idle and RCU
279287 callback offloading. Runtime reconfiguration could be provided
280288 if needed, however, due to the complexity of reconfiguring RCU at
281289 runtime, there would need to be an earthshakingly good reason.
@@ -283,12 +291,12 @@ o A reboot is required to reconfigure both adaptive idle and RCU · 1 unmodified line
283291 simply offloading RCU callbacks from all CPUs and pinning them
284292 where you want them whenever you want them pinned.
285293
286−o Additional configuration is required to deal with other sources
294+* Additional configuration is required to deal with other sources
287295 of OS jitter, including interrupts and system-utility tasks
288296 and processes. This configuration normally involves binding
289297 interrupts and tasks to particular CPUs.
290298
291−o Some sources of OS jitter can currently be eliminated only by
299+* Some sources of OS jitter can currently be eliminated only by
292300 constraining the workload. For example, the only way to eliminate
293301 OS jitter due to global TLB shootdowns is to avoid the unmapping
294302 operations (such as kernel module unload operations) that
@@ -299,17 +307,17 @@ o Some sources of OS jitter can currently be eliminated only by · 4 unmodified lines
299307 helpful, especially when combined with the mlock() and mlockall()
300308 system calls.
301309
302−o Unless all CPUs are idle, at least one CPU must keep the
310+* Unless all CPUs are idle, at least one CPU must keep the
303311 scheduling-clock interrupt going in order to support accurate
304312 timekeeping.
305313
306−o If there might potentially be some adaptive-ticks CPUs, there
314+* If there might potentially be some adaptive-ticks CPUs, there
307315 will be at least one CPU keeping the scheduling-clock interrupt
308316 going, even if all CPUs are otherwise idle.
309317
310318 Better handling of this situation is ongoing work.
311319
312−o Some process-handling operations still require the occasional
320+* Some process-handling operations still require the occasional
313321 scheduling-clock tick. These operations include calculating CPU
314322 load, maintaining sched average, computing CFS entity vruntime,
315323 computing avenrun, and carrying out load balancing. They are
Documentation/timers/timekeeping.rstrenamed from Documentation/timers/timekeeping.txt+2−1
@@ -1,5 +1,6 @@
1+===========================================================
12 Clock sources, Clock events, sched_clock() and delay timers
2−-----------------------------------------------------------
3+===========================================================
34
45 This document tries to briefly explain some basic kernel timekeeping
56 abstractions. It partly pertains to the drivers usually found in
Documentation/timers/timers-howto.rstrenamed from Documentation/timers/timers-howto.txt+11−4
@@ -1,5 +1,6 @@
1+===================================================================
12 delays - Information on the various kernel delay / sleep mechanisms
2−-------------------------------------------------------------------
3+===================================================================
34
45 This document seeks to answer the common question: "What is the
56 RightWay (TM) to insert a delay?"
@@ -17,7 +18,7 @@ code in an atomic context?" This should be followed closely by "Does · 11 unmodified lines
1718 it really need to delay in atomic context?" If so...
1819
1920 ATOMIC CONTEXT:
20− You must use the *delay family of functions. These
21+ You must use the `*delay` family of functions. These
2122 functions use the jiffie estimation of clock speed
2223 and will busy wait for enough loop cycles to achieve
2324 the desired delay:
@@ -35,21 +36,26 @@ ATOMIC CONTEXT: · 11 unmodified lines
3536 be refactored to allow for the use of msleep.
3637
3738 NON-ATOMIC CONTEXT:
38− You should use the *sleep[_range] family of functions.
39+ You should use the `*sleep[_range]` family of functions.
3940 There are a few more options here, while any of them may
4041 work correctly, using the "right" sleep function will
4142 help the scheduler, power management, and just make your
4243 driver better :)
4344
4445 -- Backed by busy-wait loop:
46+
4547 udelay(unsigned long usecs)
48+
4649 -- Backed by hrtimers:
50+
4751 usleep_range(unsigned long min, unsigned long max)
52+
4853 -- Backed by jiffies / legacy_timers
54+
4955 msleep(unsigned long msecs)
5056 msleep_interruptible(unsigned long msecs)
5157
52− Unlike the *delay family, the underlying mechanism
58+ Unlike the `*delay` family, the underlying mechanism
5359 driving each of these calls varies, thus there are
5460 quirks you should be aware of.
5561
@@ -70,6 +76,7 @@ NON-ATOMIC CONTEXT: · 14 unmodified lines
7076 - Why not msleep for (1ms - 20ms)?
7177 Explained originally here:
7278 http://lkml.org/lkml/2007/8/3/250
79+
7380 msleep(1~20) may not do what the caller intends, and
7481 will often sleep longer (~20 ms actual sleep for any
7582 value given in the 1~20ms range). In many cases this
MAINTAINERS+1−1
@@ -7192,7 +7192,7 @@ F: drivers/net/ethernet/hp/hp100.* · 7191 unmodified lines
71927192 HPET: High Precision Event Timers driver
71937193 M: Clemens Ladisch <clemens@ladisch.de>
71947194 S: Maintained
7195−F: Documentation/timers/hpet.txt
7195+F: Documentation/timers/hpet.rst
71967196 F: drivers/char/hpet.c
71977197 F: include/linux/hpet.h
71987198 F: include/uapi/linux/hpet.h
drivers/media/usb/dvb-usb-v2/anysee.c+1−1
@@ -56,7 +56,7 @@ static int anysee_ctrl_msg(struct dvb_usb_device *d, · 55 unmodified lines
5656 /* TODO FIXME: dvb_usb_generic_rw() fails rarely with error code -32
5757 * (EPIPE, Broken pipe). Function supports currently msleep() as a
5858 * 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
6060 * short, under < 20ms, sleeps. Repeating failed message would be
6161 * better choice as not to add unwanted delays...
6262 * Fixing that correctly is one of those or both;
drivers/regulator/core.c+1−1
@@ -2304,7 +2304,7 @@ static int regulator_ena_gpio_ctrl(struct regulator_dev *rdev, bool enable) · 2303 unmodified lines
23042304 *
23052305 * Delay for the requested amount of time as per the guidelines in:
23062306 *
2307− * Documentation/timers/timers-howto.txt
2307+ * Documentation/timers/timers-howto.rst
23082308 *
23092309 * The assumption here is that regulators will never be enabled in
23102310 * atomic context and therefore sleeping functions can be used.
include/linux/iopoll.h+2−2
@@ -21,7 +21,7 @@ · 20 unmodified lines
2121 * @cond: Break condition (usually involving @val)
2222 * @sleep_us: Maximum time to sleep between reads in us (0
2323 * 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).
2525 * @timeout_us: Timeout in us, 0 means never timeout
2626 *
2727 * Returns 0 on success and -ETIMEDOUT upon a timeout. In either
@@ -60,7 +60,7 @@ · 32 unmodified lines
6060 * @cond: Break condition (usually involving @val)
6161 * @delay_us: Time to udelay between reads in us (0 tight-loops). Should
6262 * be less than ~10us since udelay is used (see
63− * Documentation/timers/timers-howto.txt).
63+ * Documentation/timers/timers-howto.rst).
6464 * @timeout_us: Timeout in us, 0 means never timeout
6565 *
6666 * Returns 0 on success and -ETIMEDOUT upon a timeout. In either
include/linux/regmap.h+2−2
@@ -112,7 +112,7 @@ struct reg_sequence { · 111 unmodified lines
112112 * @cond: Break condition (usually involving @val)
113113 * @sleep_us: Maximum time to sleep between reads in us (0
114114 * 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).
116116 * @timeout_us: Timeout in us, 0 means never timeout
117117 *
118118 * Returns 0 on success and -ETIMEDOUT upon a timeout or the regmap_read
@@ -154,7 +154,7 @@ struct reg_sequence { · 35 unmodified lines
154154 * @cond: Break condition (usually involving @val)
155155 * @sleep_us: Maximum time to sleep between reads in us (0
156156 * 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).
158158 * @timeout_us: Timeout in us, 0 means never timeout
159159 *
160160 * Returns 0 on success and -ETIMEDOUT upon a timeout or the regmap_field_read
scripts/checkpatch.pl+4−4
@@ -5712,7 +5712,7 @@ sub process { · 5711 unmodified lines
57125712 # ignore udelay's < 10, however
57135713 if (! ($delay < 10) ) {
57145714 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);
57165716 }
57175717 if ($delay > 2000) {
57185718 WARN("LONG_UDELAY",
@@ -5724,7 +5724,7 @@ sub process { · 5 unmodified lines
57245724 if ($line =~ /\bmsleep\s*\((\d+)\);/) {
57255725 if ($1 < 20) {
57265726 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);
57285728 }
57295729 }
57305730
@@ -6115,11 +6115,11 @@ sub process { · 384 unmodified lines
61156115 my $max = $7;
61166116 if ($min eq $max) {
61176117 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");
61196119 } elsif ($min =~ /^\d+$/ && $max =~ /^\d+$/ &&
61206120 $min > $max) {
61216121 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");
61236123 }
61246124 }
61256125
sound/soc/sof/ops.h+1−1
@@ -349,7 +349,7 @@ static inline const struct snd_sof_dsp_ops · 348 unmodified lines
349349 * @cond: Break condition (usually involving @val)
350350 * @sleep_us: Maximum time to sleep between reads in us (0
351351 * 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).
353353 * @timeout_us: Timeout in us, 0 means never timeout
354354 *
355355 * Returns 0 on success and -ETIMEDOUT upon a timeout. In either

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t