Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[muen/linux.git] / include / linux / sched.h
index 5e8759b1b428082e4f90909107583b4caa1e5b3f..20814b7d7d70ebb40471e1eff9a27f865db0f635 100644 (file)
@@ -223,6 +223,24 @@ 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;
+       u64                     utime;
+       u64                     stime;
+       u64                     gtime;
+};
+
 struct sched_info {
 #ifdef CONFIG_SCHED_INFO
        /* Cumulative counters: */
@@ -688,16 +706,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_snap;
-       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_snap_whence;
+       struct vtime                    vtime;
 #endif
 
 #ifdef CONFIG_NO_HZ_FULL