Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cfb766da authored by Tejun Heo's avatar Tejun Heo
Browse files

sched/cputime: Expose cputime_adjust()



Will be used by basic cgroup resource stat reporting later.

Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Acked-by: default avatarPeter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Li Zefan <lizefan@huawei.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
parent e19b205b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -53,7 +53,8 @@ static inline void task_cputime_scaled(struct task_struct *t,

extern void task_cputime_adjusted(struct task_struct *p, u64 *ut, u64 *st);
extern void thread_group_cputime_adjusted(struct task_struct *p, u64 *ut, u64 *st);

extern void cputime_adjust(struct task_cputime *curr, struct prev_cputime *prev,
			   u64 *ut, u64 *st);

/*
 * Thread group CPU time accounting.
+2 −3
Original line number Diff line number Diff line
@@ -585,8 +585,7 @@ static u64 scale_stime(u64 stime, u64 rtime, u64 total)
 *
 * Assuming that rtime_i+1 >= rtime_i.
 */
static void cputime_adjust(struct task_cputime *curr,
			   struct prev_cputime *prev,
void cputime_adjust(struct task_cputime *curr, struct prev_cputime *prev,
		    u64 *ut, u64 *st)
{
	u64 rtime, stime, utime;