sched/cputime: Move the vtime task fields to their own struct
[linux-2.6-block.git] / include / linux / sched.h
index ff001646549e8698ff37e59d7b1bd8343322c813..eeff8a024f0ccce667feb2fbf74b07384f84c9b7 100644 (file)
@@ -223,6 +223,21 @@ struct task_cputime {
 #define prof_exp                       stime
 #define sched_exp                      sum_exec_runtime
 
+enum vtime_state {
+       /* Task is sleeping or running in a CPU with VTIME inactive: */
+       VTIME_INACTIVE = 0,
+       /* Task runs in userspace in a CPU with VTIME active: */
+       VTIME_USER,
+       /* Task runs in kernelspace in a CPU with VTIME active: */
+       VTIME_SYS,
+};
+
+struct vtime {
+       seqcount_t              seqcount;
+       unsigned long long      starttime;
+       enum vtime_state        state;
+};
+
 struct sched_info {
 #ifdef CONFIG_SCHED_INFO
        /* Cumulative counters: */
@@ -688,16 +703,7 @@ struct task_struct {
        u64                             gtime;
        struct prev_cputime             prev_cputime;
 #ifdef CONFIG_VIRT_CPU_ACCOUNTING_GEN
-       seqcount_t                      vtime_seqcount;
-       unsigned long long              vtime_starttime;
-       enum {
-               /* Task is sleeping or running in a CPU with VTIME inactive: */
-               VTIME_INACTIVE = 0,
-               /* Task runs in userspace in a CPU with VTIME active: */
-               VTIME_USER,
-               /* Task runs in kernelspace in a CPU with VTIME active: */
-               VTIME_SYS,
-       } vtime_state;
+       struct vtime                    vtime;
 #endif
 
 #ifdef CONFIG_NO_HZ_FULL