aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2017-09-25 11:12:04 -0400
committerTejun Heo <tj@kernel.org>2017-09-25 11:12:04 -0400
commitcfb766da54d98ceb145e1bb0bd11c559569dcbfc (patch)
tree858e336a35d482be7c21124d567192156c67920d
parente19b205be43d11bff638cad4487008c48d21c103 (diff)
sched/cputime: Expose cputime_adjust()
Will be used by basic cgroup resource stat reporting later. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Peter Zijlstra <peterz@infradead.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Li Zefan <lizefan@huawei.com> Cc: Johannes Weiner <hannes@cmpxchg.org>
-rw-r--r--include/linux/sched/cputime.h3
-rw-r--r--kernel/sched/cputime.c5
2 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/sched/cputime.h b/include/linux/sched/cputime.h
index 4c5b9735c1ae..9251044335c5 100644
--- a/include/linux/sched/cputime.h
+++ b/include/linux/sched/cputime.h
@@ -53,7 +53,8 @@ static inline void task_cputime_scaled(struct task_struct *t,
53 53
54extern void task_cputime_adjusted(struct task_struct *p, u64 *ut, u64 *st); 54extern void task_cputime_adjusted(struct task_struct *p, u64 *ut, u64 *st);
55extern void thread_group_cputime_adjusted(struct task_struct *p, u64 *ut, u64 *st); 55extern void thread_group_cputime_adjusted(struct task_struct *p, u64 *ut, u64 *st);
56 56extern void cputime_adjust(struct task_cputime *curr, struct prev_cputime *prev,
57 u64 *ut, u64 *st);
57 58
58/* 59/*
59 * Thread group CPU time accounting. 60 * Thread group CPU time accounting.
diff --git a/kernel/sched/cputime.c b/kernel/sched/cputime.c
index 14d2dbf97c53..8839b6e8a104 100644
--- a/kernel/sched/cputime.c
+++ b/kernel/sched/cputime.c
@@ -585,9 +585,8 @@ drop_precision:
585 * 585 *
586 * Assuming that rtime_i+1 >= rtime_i. 586 * Assuming that rtime_i+1 >= rtime_i.
587 */ 587 */
588static void cputime_adjust(struct task_cputime *curr, 588void cputime_adjust(struct task_cputime *curr, struct prev_cputime *prev,
589 struct prev_cputime *prev, 589 u64 *ut, u64 *st)
590 u64 *ut, u64 *st)
591{ 590{
592 u64 rtime, stime, utime; 591 u64 rtime, stime, utime;
593 unsigned long flags; 592 unsigned long flags;