diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-07-09 20:52:16 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-07-09 20:52:16 +0300 |
commit | 4fde846ac0f019b7c877da35e1c1517d79e17ffc (patch) | |
tree | ee94559d13406f2ba29819fd3d0e6c4cc85ac174 /include/linux/sched.h | |
parent | c3931a87db9e840dc20f3b962668d477eaeb2f75 (diff) | |
parent | 242fc35290bd8cf0effc6e3474e3a417985de2f3 (diff) | |
download | linux-4fde846ac0f019b7c877da35e1c1517d79e17ffc.tar.xz |
Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull scheduler fixes from Thomas Gleixner:
"This scheduler update provides:
- The (hopefully) final fix for the vtime accounting issues which
were around for quite some time
- Use types known to user space in UAPI headers to unbreak user space
builds
- Make load balancing respect the current scheduling domain again
instead of evaluating unrelated CPUs"
* 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
sched/headers/uapi: Fix linux/sched/types.h userspace compilation errors
sched/fair: Fix load_balance() affinity redo path
sched/cputime: Accumulate vtime on top of nsec clocksource
sched/cputime: Move the vtime task fields to their own struct
sched/cputime: Rename vtime fields
sched/cputime: Always set tsk->vtime_snap_whence after accounting vtime
vtime, sched/cputime: Remove vtime_account_user()
Revert "sched/cputime: Refactor the cputime_adjust() code"
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 5e8759b1b428..20814b7d7d70 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -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 |