diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-02-20 15:52:55 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-02-20 15:52:55 -0500 |
commit | 828cad8ea05d194d8a9452e0793261c2024c23a2 (patch) | |
tree | 0ad7c7e044cdcfe75d78da0b52eb2358d4686e02 /kernel/sys.c | |
parent | 60c906bab124a0627fba04c9ca5e61bba4747c0c (diff) | |
parent | bb3bac2ca9a3a5b7fa601781adf70167a0449d75 (diff) |
Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull scheduler updates from Ingo Molnar:
"The main changes in this (fairly busy) cycle were:
- There was a class of scheduler bugs related to forgetting to update
the rq-clock timestamp which can cause weird and hard to debug
problems, so there's a new debug facility for this: which uncovered
a whole lot of bugs which convinced us that we want to keep the
debug facility.
(Peter Zijlstra, Matt Fleming)
- Various cputime related updates: eliminate cputime and use u64
nanoseconds directly, simplify and improve the arch interfaces,
implement delayed accounting more widely, etc. - (Frederic
Weisbecker)
- Move code around for better structure plus cleanups (Ingo Molnar)
- Move IO schedule accounting deeper into the scheduler plus related
changes to improve the situation (Tejun Heo)
- ... plus a round of sched/rt and sched/deadline fixes, plus other
fixes, updats and cleanups"
* 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (85 commits)
sched/core: Remove unlikely() annotation from sched_move_task()
sched/autogroup: Rename auto_group.[ch] to autogroup.[ch]
sched/topology: Split out scheduler topology code from core.c into topology.c
sched/core: Remove unnecessary #include headers
sched/rq_clock: Consolidate the ordering of the rq_clock methods
delayacct: Include <uapi/linux/taskstats.h>
sched/core: Clean up comments
sched/rt: Show the 'sched_rr_timeslice' SCHED_RR timeslice tuning knob in milliseconds
sched/clock: Add dummy clear_sched_clock_stable() stub function
sched/cputime: Remove generic asm headers
sched/cputime: Remove unused nsec_to_cputime()
s390, sched/cputime: Remove unused cputime definitions
powerpc, sched/cputime: Remove unused cputime definitions
s390, sched/cputime: Make arch_cpu_idle_time() to return nsecs
ia64, sched/cputime: Remove unused cputime definitions
ia64: Convert vtime to use nsec units directly
ia64, sched/cputime: Move the nsecs based cputime headers to the last arch using it
sched/cputime: Remove jiffies based cputime
sched/cputime, vtime: Return nsecs instead of cputime_t to account
sched/cputime: Complete nsec conversion of tick based accounting
...
Diffstat (limited to 'kernel/sys.c')
-rw-r--r-- | kernel/sys.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/kernel/sys.c b/kernel/sys.c index 842914ef7de4..7d4a9a6df956 100644 --- a/kernel/sys.c +++ b/kernel/sys.c | |||
@@ -881,15 +881,15 @@ SYSCALL_DEFINE0(getegid) | |||
881 | 881 | ||
882 | void do_sys_times(struct tms *tms) | 882 | void do_sys_times(struct tms *tms) |
883 | { | 883 | { |
884 | cputime_t tgutime, tgstime, cutime, cstime; | 884 | u64 tgutime, tgstime, cutime, cstime; |
885 | 885 | ||
886 | thread_group_cputime_adjusted(current, &tgutime, &tgstime); | 886 | thread_group_cputime_adjusted(current, &tgutime, &tgstime); |
887 | cutime = current->signal->cutime; | 887 | cutime = current->signal->cutime; |
888 | cstime = current->signal->cstime; | 888 | cstime = current->signal->cstime; |
889 | tms->tms_utime = cputime_to_clock_t(tgutime); | 889 | tms->tms_utime = nsec_to_clock_t(tgutime); |
890 | tms->tms_stime = cputime_to_clock_t(tgstime); | 890 | tms->tms_stime = nsec_to_clock_t(tgstime); |
891 | tms->tms_cutime = cputime_to_clock_t(cutime); | 891 | tms->tms_cutime = nsec_to_clock_t(cutime); |
892 | tms->tms_cstime = cputime_to_clock_t(cstime); | 892 | tms->tms_cstime = nsec_to_clock_t(cstime); |
893 | } | 893 | } |
894 | 894 | ||
895 | SYSCALL_DEFINE1(times, struct tms __user *, tbuf) | 895 | SYSCALL_DEFINE1(times, struct tms __user *, tbuf) |
@@ -1544,7 +1544,7 @@ static void k_getrusage(struct task_struct *p, int who, struct rusage *r) | |||
1544 | { | 1544 | { |
1545 | struct task_struct *t; | 1545 | struct task_struct *t; |
1546 | unsigned long flags; | 1546 | unsigned long flags; |
1547 | cputime_t tgutime, tgstime, utime, stime; | 1547 | u64 tgutime, tgstime, utime, stime; |
1548 | unsigned long maxrss = 0; | 1548 | unsigned long maxrss = 0; |
1549 | 1549 | ||
1550 | memset((char *)r, 0, sizeof (*r)); | 1550 | memset((char *)r, 0, sizeof (*r)); |
@@ -1600,8 +1600,8 @@ static void k_getrusage(struct task_struct *p, int who, struct rusage *r) | |||
1600 | unlock_task_sighand(p, &flags); | 1600 | unlock_task_sighand(p, &flags); |
1601 | 1601 | ||
1602 | out: | 1602 | out: |
1603 | cputime_to_timeval(utime, &r->ru_utime); | 1603 | r->ru_utime = ns_to_timeval(utime); |
1604 | cputime_to_timeval(stime, &r->ru_stime); | 1604 | r->ru_stime = ns_to_timeval(stime); |
1605 | 1605 | ||
1606 | if (who != RUSAGE_CHILDREN) { | 1606 | if (who != RUSAGE_CHILDREN) { |
1607 | struct mm_struct *mm = get_task_mm(p); | 1607 | struct mm_struct *mm = get_task_mm(p); |