All of lore.kernel.org
 help / color / mirror / Atom feed
From: AP <ap@zip.com.au>
To: Michael Kerrisk <mtk.manpages@googlemail.com>
Cc: Laurent Vivier <Laurent.Vivier@bull.net>,
	Michael Kerrisk <mtk.manpages@gmail.com>,
	Samuel Thibault <samuel.thibault@ens-lyon.org>,
	lkml <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	trivial@kernel.org
Subject: [PATCH] Documentation: add descs for guest fields in stat procfs files
Date: Tue, 24 Jun 2008 22:43:06 +1000	[thread overview]
Message-ID: <20080624124306.GK2896@zip.com.au> (raw)
In-Reply-To: <cfd18e0f0806230351nd9eb54ei5e87734291ced9be@mail.gmail.com>

Git patch 5e84cfde51cf303d368fcb48f22059f37b3872de introduced a new
field to /proc/stat that represents guest (virtual cpu) time.

Git patch 9ac52315d4cf5f561f36dabaf0720c00d3553162 introduced the same
to /proc/<pid>/stat along with a guest time of the tasks children.

The patch below adds descriptions of these fields to the procfs
documentation included in the kernel.

Signed-Off-By: Andrew P <ap@zip.com.au>

diff -aur linux-2.6.26-rc7-git2.orig/Documentation/filesystems/proc.txt linux-2.6.26-rc7-git2/Documentation/filesystems/proc.txt
--- linux-2.6.26-rc7-git2.orig/Documentation/filesystems/proc.txt	2008-06-23 22:27:13.000000000 +1000
+++ linux-2.6.26-rc7-git2/Documentation/filesystems/proc.txt	2008-06-24 22:16:53.000000000 +1000
@@ -210,9 +210,9 @@
   cmin_flt      number of minor faults with child's
   maj_flt       number of major faults
   cmaj_flt      number of major faults with child's
-  utime         user mode jiffies
+  utime         user mode jiffies (including gtime below*)
   stime         kernel mode jiffies
-  cutime        user mode jiffies with child's
+  cutime        user mode jiffies with child's (including cgtime below*)
   cstime        kernel mode jiffies with child's
   priority      priority level
   nice          nice level
@@ -239,6 +239,11 @@
   rt_priority   realtime priority
   policy        scheduling policy (man sched_setscheduler)
   blkio_ticks   time spent waiting for block IO
+  gtime         guest (virtual CPU) CPU time in jiffies
+  cgtime        guests' children's CPU time in jiffies
+
+* gtime and cgtime are included in these values so that applications that are
+  not aware of these fields do not lose time in their calculations.
 ..............................................................................
 
 
@@ -828,9 +833,9 @@
 since the system first booted.  For a quick look, simply cat the file:
 
   > cat /proc/stat
-  cpu  2255 34 2290 22625563 6290 127 456 0
-  cpu0 1132 34 1441 11311718 3675 127 438 0
-  cpu1 1123 0 849 11313845 2614 0 18 0
+  cpu  2255 34 2290 22625563 6290 127 456 0 0
+  cpu0 1132 34 1441 11311718 3675 127 438 0 0
+  cpu1 1123 0 849 11313845 2614 0 18 0 0
   intr 114930548 113199788 3 0 5 263 0 4 [... lots more numbers ...]
   ctxt 1990473
   btime 1062191376
@@ -843,7 +848,8 @@
 different kinds of work.  Time units are in USER_HZ (typically hundredths of a
 second).  The meanings of the columns are as follows, from left to right:
 
-- user: normal processes executing in user mode
+- user: normal processes executing in user mode (includes guest time below so
+        that guest-unaware applications do not lose time)
 - nice: niced processes executing in user mode
 - system: processes executing in kernel mode
 - idle: twiddling thumbs
@@ -851,6 +857,7 @@
 - irq: servicing interrupts
 - softirq: servicing softirqs
 - steal: involuntary wait
+- guest: time used to run a virtual CPU
 
 The "intr" line gives counts of interrupts  serviced since boot time, for each
 of the  possible system interrupts.   The first  column  is the  total of  all

  parent reply	other threads:[~2008-06-24 13:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-22  7:31 /proc 2.6.24 changes for guest CPU accounting Michael Kerrisk
2008-06-23  8:28 ` Christian Borntraeger
2008-06-23  8:48 ` Laurent Vivier
2008-06-23 10:51   ` Michael Kerrisk
2008-06-24 12:39     ` AP
2008-06-24 12:43     ` AP [this message]
2008-06-24 20:38       ` [PATCH] Documentation: add descs for guest fields in stat procfs files Laurent Vivier
2008-06-25  3:28       ` Michael Kerrisk

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=20080624124306.GK2896@zip.com.au \
    --to=ap@zip.com.au \
    --cc=Laurent.Vivier@bull.net \
    --cc=borntraeger@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mtk.manpages@gmail.com \
    --cc=mtk.manpages@googlemail.com \
    --cc=samuel.thibault@ens-lyon.org \
    --cc=trivial@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.