]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/taskstats.h
[PATCH] per-task-delay-accounting: delay accounting usage of taskstats interface
[linux-2.6-omap-h63xx.git] / include / linux / taskstats.h
index 51f62759bea9fd23a5158e19f42b5480fde60e29..c6aeca32348e63268f9e0346a57ba9def2c86fe2 100644 (file)
 struct taskstats {
 
        /* Version 1 */
-       __u64   version;
+       __u16   version;
+       __u16   padding[3];     /* Userspace should not interpret the padding
+                                * field which can be replaced by useful
+                                * fields if struct taskstats is extended.
+                                */
+
+       /* Delay accounting fields start
+        *
+        * All values, until comment "Delay accounting fields end" are
+        * available only if delay accounting is enabled, even though the last
+        * few fields are not delays
+        *
+        * xxx_count is the number of delay values recorded
+        * xxx_delay_total is the corresponding cumulative delay in nanoseconds
+        *
+        * xxx_delay_total wraps around to zero on overflow
+        * xxx_count incremented regardless of overflow
+        */
+
+       /* Delay waiting for cpu, while runnable
+        * count, delay_total NOT updated atomically
+        */
+       __u64   cpu_count;
+       __u64   cpu_delay_total;
+
+       /* Following four fields atomically updated using task->delays->lock */
+
+       /* Delay waiting for synchronous block I/O to complete
+        * does not account for delays in I/O submission
+        */
+       __u64   blkio_count;
+       __u64   blkio_delay_total;
+
+       /* Delay waiting for page fault I/O (swap in only) */
+       __u64   swapin_count;
+       __u64   swapin_delay_total;
+
+       /* cpu "wall-clock" running time
+        * On some architectures, value will adjust for cpu time stolen
+        * from the kernel in involuntary waits due to virtualization.
+        * Value is cumulative, in nanoseconds, without a corresponding count
+        * and wraps around to zero silently on overflow
+        */
+       __u64   cpu_run_real_total;
+
+       /* cpu "virtual" running time
+        * Uses time intervals seen by the kernel i.e. no adjustment
+        * for kernel's involuntary waits due to virtualization.
+        * Value is cumulative, in nanoseconds, without a corresponding count
+        * and wraps around to zero silently on overflow
+        */
+       __u64   cpu_run_virtual_total;
+       /* Delay accounting fields end */
+       /* version 1 ends here */
 };