Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-next-2.6
[safe/jmp/linux-2.6] / include / linux / taskstats.h
index 3fced47..341dddb 100644 (file)
@@ -16,6 +16,8 @@
 #ifndef _LINUX_TASKSTATS_H
 #define _LINUX_TASKSTATS_H
 
+#include <linux/types.h>
+
 /* Format for per-task data returned to userland when
  *     - a task exits
  *     - listener requests stats for a task
@@ -31,7 +33,7 @@
  */
 
 
-#define TASKSTATS_VERSION      3
+#define TASKSTATS_VERSION      7
 #define TS_COMM_LEN            32      /* should be >= TASK_COMM_LEN
                                         * in linux/sched.h */
 
@@ -66,7 +68,7 @@ struct taskstats {
        /* Delay waiting for cpu, while runnable
         * count, delay_total NOT updated atomically
         */
-       __u64   cpu_count;
+       __u64   cpu_count __attribute__((aligned(8)));
        __u64   cpu_delay_total;
 
        /* Following four fields atomically updated using task->delays->lock */
@@ -101,14 +103,17 @@ struct taskstats {
 
        /* Basic Accounting Fields start */
        char    ac_comm[TS_COMM_LEN];   /* Command name */
-       __u8    ac_sched;               /* Scheduling discipline */
+       __u8    ac_sched __attribute__((aligned(8)));
+                                       /* Scheduling discipline */
        __u8    ac_pad[3];
-       __u32   ac_uid;                 /* User ID */
+       __u32   ac_uid __attribute__((aligned(8)));
+                                       /* User ID */
        __u32   ac_gid;                 /* Group ID */
        __u32   ac_pid;                 /* Process ID */
        __u32   ac_ppid;                /* Parent process ID */
        __u32   ac_btime;               /* Begin time [sec since 1970] */
-       __u64   ac_etime;               /* Elapsed time [usec] */
+       __u64   ac_etime __attribute__((aligned(8)));
+                                       /* Elapsed time [usec] */
        __u64   ac_utime;               /* User CPU time [usec] */
        __u64   ac_stime;               /* SYstem CPU time [usec] */
        __u64   ac_minflt;              /* Minor Page Fault Count */
@@ -146,6 +151,18 @@ struct taskstats {
        __u64   read_bytes;             /* bytes of read I/O */
        __u64   write_bytes;            /* bytes of write I/O */
        __u64   cancelled_write_bytes;  /* bytes of cancelled write I/O */
+
+       __u64  nvcsw;                   /* voluntary_ctxt_switches */
+       __u64  nivcsw;                  /* nonvoluntary_ctxt_switches */
+
+       /* time accounting for SMT machines */
+       __u64   ac_utimescaled;         /* utime scaled on frequency etc */
+       __u64   ac_stimescaled;         /* stime scaled on frequency etc */
+       __u64   cpu_scaled_run_real_total; /* scaled cpu_run_real_total */
+
+       /* Delay waiting for memory reclaim */
+       __u64   freepages_count;
+       __u64   freepages_delay_total;
 };