linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Korty <joe.korty-oXJCJecloQs@public.gmane.org>
To: Greg KH <greg-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
Cc: Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>,
	Ingo Molnar <mingo-X9Un+BFzKDI@public.gmane.org>,
	Alexey Dobriyan
	<adobriyan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Linux API <linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: [PATCH] ABI Documentation for /proc/timer_list
Date: Wed, 26 Nov 2008 16:06:13 -0500	[thread overview]
Message-ID: <20081126210613.GA20529@tsunami.ccur.com> (raw)
In-Reply-To: <20081126173931.GA1636-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>

Document /proc/timer_list ABI.

This documents all of /timer_list, including the extension
adding jiffie timers, as proposed in the patch:

   [PATCH] Display active jiffie timers in /proc/timer_list, v2 

Signed-off-by: Joe Korty <joe.korty-oXJCJecloQs@public.gmane.org>

Index: 2.6.28-rc6/Documentation/ABI/stable/procfs-timer_list
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ 2.6.28-rc6/Documentation/ABI/stable/procfs-timer_list	2008-11-26 15:55:04.000000000 -0500
@@ -0,0 +1,96 @@
+What:		/proc/timer_list
+Date:		November 2008
+Contact:	Ingo Molnar <mingo-X9Un+BFzKDI@public.gmane.org>
+		Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
+		Joe Korty <joe.korty-oXJCJecloQs@public.gmane.org>
+Revision-Rate:	Moderate
+At-Revision:	0.5
+Description:
+		/proc/timer_list displays most everything about every kind
+		of timer, and some things about time too.
+
+		The contents of this file should be expected to change,
+		as the data displayed corresponds directly to various
+		kernel-internal data structures.  For this reason, the first
+		line contains the file revision.  It is the responsibility
+		of this file's maintainers to bump the revision each time a
+		kernel is released having incompatible changes in this file.
+
+		Section Overview
+		----------------
+		The file contains several somewhat independent sections.
+
+		The first section contains a few lines of global info.
+		Examples: file version id, #clock types in the kernel,
+		#nsecs since boot.
+
+		The second section is organized per-cpu.  Each cpu subsection
+		in turn contains several sub-subsections which are, in order
+		of appearance:
+
+		   The contents of the data structures associated with each
+		   clock (CLOCK_REALTIME, CLOCK_MONOTONIC, etc) on this cpu.
+		   Examples: base, index, resolution, get_timer, offset.
+		   Under each of these clocks is, in turn, a display of all
+		   the active high resolution timers queued to that clock.
+		   Example: all lines beginning with '#'.
+
+		   The contents of per-cpu timer data fields not associated
+		   with a particular clock type (ie, shared by both clocks or
+		   not associated with any clock). Examples: expires_next,
+		   hres_active, nr_event, nohz_mode, all things idle_*,
+		   tick_stopped, last_jiffies, next_jiffies.
+
+		   A display of low resolution (ie, jiffie) timer wheel
+		   data.  Examples: base, running_timer, timer_jiffies.
+		   Also under this section is a display, one per line, of
+		   each active jiffie timer queued to this cpu.  Examples:
+		   All lines under an 'active jiffie timers' section that
+		   begin with a number.
+
+		The third and final section describes each 'tick device'
+		known to the kernel.  A tick device is a piece of hardware
+		capable of generating periodic and/or one shot interrupts
+		under software control, and thus is capable of generating
+		the interrupts needed to expire the various active timers at
+		their given expiration times.  Examples: hpet, pit, lapic.
+
+		Hires Timer Layout
+		------------------
+		High resolution timers are displayed on lines that begin
+		with a '#' and always appear under one of the many sections
+		labeled 'active timers'.  There is an 'active timers'
+		section for every cpu and every clock.
+
+		The fields of a hrtimer, spread out over two lines, are:
+
+		line 1 fields:
+		  1 - unique hrtimer index (#0, #1, #2, etc)
+		  2 - kernel address of the hrtimer data structure
+		      in question
+		  3 - function to be called when timer expires
+		  4 - timer state (eg, S:01), avail states, OR-able:
+		      0 - inactive
+		      1 - enqueued
+		      2 - callback
+		      4 - pending
+		      8 - migrate
+		  5 - function which created the timer
+		  6 - process name & pid which created the timer
+
+		line 2 fields:
+		  1 - absolute expiration time, range format (start - end)
+		  2 - relative expiration time, range format (start - end)
+
+		Lowres Timer Layout
+		-------------------
+		Low resolution timers are displayed one-per-line under
+		sections labeled 'active jiffie timers'.  There is one such
+		section per cpu.  A lowres timer has the following fields:
+
+		  1 - #jiffies remaining until timer expires
+		  2 - function to be called on expiration
+		  3 - data value to be given to the above function on
+		      expiration
+		  4 - function which created this timer
+		  5 - name & pid of the process that created this timer

--
To unsubscribe from this list: send the line "unsubscribe linux-api" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2008-11-26 21:06 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20081121221113.GA13566@tsunami.ccur.com>
     [not found] ` <20081121221113.GA13566-jPwT5PJblzyhckIl5yWhCw@public.gmane.org>
2008-11-25 16:06   ` [PATCH] create /proc/timer-wheel-list Michael Kerrisk
2008-11-25 18:57     ` [PATCH] Display active jiffie timers in /proc/timer_list Joe Korty
     [not found]       ` <20081125185740.GA21806-jPwT5PJblzyhckIl5yWhCw@public.gmane.org>
2008-11-25 21:36         ` Thomas Gleixner
     [not found]           ` <alpine.LFD.2.00.0811252224430.3235-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2008-11-25 22:23             ` Joe Korty
2008-11-25 22:53               ` Thomas Gleixner
2008-11-26 16:48       ` [PATCH] Display active jiffie timers in /proc/timer_list, v2 Joe Korty
     [not found]         ` <20081126164845.GA17394-jPwT5PJblzyhckIl5yWhCw@public.gmane.org>
2008-11-26 17:07           ` Greg KH
     [not found]             ` <20081126170715.GA28422-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2008-11-26 17:34               ` Joe Korty
     [not found]                 ` <20081126173410.GA17879-jPwT5PJblzyhckIl5yWhCw@public.gmane.org>
2008-11-26 17:39                   ` Greg KH
     [not found]                     ` <20081126173931.GA1636-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2008-11-26 21:06                       ` Joe Korty [this message]
     [not found]                         ` <20081126210613.GA20529-jPwT5PJblzyhckIl5yWhCw@public.gmane.org>
2008-11-28 21:37                           ` [PATCH] ABI Documentation for /proc/timer_list Michael Kerrisk
     [not found]                             ` <cfd18e0f0811281337j57166b4cv54e05296a779252e-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-12-01 18:11                               ` [PATCH] ABI Documentation for /proc/timer_list, v2 Joe Korty
2008-12-05 17:12                                 ` Randy Dunlap
     [not found]                                   ` <493960F2.6070102-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2008-12-05 19:01                                     ` Joe Korty

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081126210613.GA20529@tsunami.ccur.com \
    --to=joe.korty-oxjcjecloqs@public.gmane.org \
    --cc=adobriyan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=greg-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org \
    --cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mingo-X9Un+BFzKDI@public.gmane.org \
    --cc=tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).