diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2008-03-05 12:28:15 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2008-04-17 06:22:31 -0400 |
commit | 3833eecc183ce052e9ac96b39b45121a2d11ac16 (patch) | |
tree | 58844d33c1006c6e11d9cdbed822c6aa89d9dfcc /Documentation/hrtimer | |
parent | 903b8a8d4835a796f582033802c83283886f4a3d (diff) |
Documentation: move timer related documentation to a single place
We have two directories with timer related information in
Documentation/: hrtimers/ and hrtimer/. timer_stats are not restricted
to hrtimers. Move all those files into Documentation/timers where we
can pile up other timer related docs as well.
Pointed-out-by: Randy Dunlap <randy@oracle.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'Documentation/hrtimer')
-rw-r--r-- | Documentation/hrtimer/timer_stats.txt | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/Documentation/hrtimer/timer_stats.txt b/Documentation/hrtimer/timer_stats.txt deleted file mode 100644 index 20d368c59814..000000000000 --- a/Documentation/hrtimer/timer_stats.txt +++ /dev/null | |||
@@ -1,73 +0,0 @@ | |||
1 | timer_stats - timer usage statistics | ||
2 | ------------------------------------ | ||
3 | |||
4 | timer_stats is a debugging facility to make the timer (ab)usage in a Linux | ||
5 | system visible to kernel and userspace developers. If enabled in the config | ||
6 | but not used it has almost zero runtime overhead, and a relatively small | ||
7 | data structure overhead. Even if collection is enabled runtime all the | ||
8 | locking is per-CPU and lookup is hashed. | ||
9 | |||
10 | timer_stats should be used by kernel and userspace developers to verify that | ||
11 | their code does not make unduly use of timers. This helps to avoid unnecessary | ||
12 | wakeups, which should be avoided to optimize power consumption. | ||
13 | |||
14 | It can be enabled by CONFIG_TIMER_STATS in the "Kernel hacking" configuration | ||
15 | section. | ||
16 | |||
17 | timer_stats collects information about the timer events which are fired in a | ||
18 | Linux system over a sample period: | ||
19 | |||
20 | - the pid of the task(process) which initialized the timer | ||
21 | - the name of the process which initialized the timer | ||
22 | - the function where the timer was intialized | ||
23 | - the callback function which is associated to the timer | ||
24 | - the number of events (callbacks) | ||
25 | |||
26 | timer_stats adds an entry to /proc: /proc/timer_stats | ||
27 | |||
28 | This entry is used to control the statistics functionality and to read out the | ||
29 | sampled information. | ||
30 | |||
31 | The timer_stats functionality is inactive on bootup. | ||
32 | |||
33 | To activate a sample period issue: | ||
34 | # echo 1 >/proc/timer_stats | ||
35 | |||
36 | To stop a sample period issue: | ||
37 | # echo 0 >/proc/timer_stats | ||
38 | |||
39 | The statistics can be retrieved by: | ||
40 | # cat /proc/timer_stats | ||
41 | |||
42 | The readout of /proc/timer_stats automatically disables sampling. The sampled | ||
43 | information is kept until a new sample period is started. This allows multiple | ||
44 | readouts. | ||
45 | |||
46 | Sample output of /proc/timer_stats: | ||
47 | |||
48 | Timerstats sample period: 3.888770 s | ||
49 | 12, 0 swapper hrtimer_stop_sched_tick (hrtimer_sched_tick) | ||
50 | 15, 1 swapper hcd_submit_urb (rh_timer_func) | ||
51 | 4, 959 kedac schedule_timeout (process_timeout) | ||
52 | 1, 0 swapper page_writeback_init (wb_timer_fn) | ||
53 | 28, 0 swapper hrtimer_stop_sched_tick (hrtimer_sched_tick) | ||
54 | 22, 2948 IRQ 4 tty_flip_buffer_push (delayed_work_timer_fn) | ||
55 | 3, 3100 bash schedule_timeout (process_timeout) | ||
56 | 1, 1 swapper queue_delayed_work_on (delayed_work_timer_fn) | ||
57 | 1, 1 swapper queue_delayed_work_on (delayed_work_timer_fn) | ||
58 | 1, 1 swapper neigh_table_init_no_netlink (neigh_periodic_timer) | ||
59 | 1, 2292 ip __netdev_watchdog_up (dev_watchdog) | ||
60 | 1, 23 events/1 do_cache_clean (delayed_work_timer_fn) | ||
61 | 90 total events, 30.0 events/sec | ||
62 | |||
63 | The first column is the number of events, the second column the pid, the third | ||
64 | column is the name of the process. The forth column shows the function which | ||
65 | initialized the timer and in parantheses the callback function which was | ||
66 | executed on expiry. | ||
67 | |||
68 | Thomas, Ingo | ||
69 | |||
70 | Added flag to indicate 'deferrable timer' in /proc/timer_stats. A deferrable | ||
71 | timer will appear as follows | ||
72 | 10D, 1 swapper queue_delayed_work_on (delayed_work_timer_fn) | ||
73 | |||