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>
This commit is contained in:
Родитель
e19b205be4
Коммит
cfb766da54
|
@ -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 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 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.
|
* Thread group CPU time accounting.
|
||||||
|
|
|
@ -585,9 +585,8 @@ drop_precision:
|
||||||
*
|
*
|
||||||
* Assuming that rtime_i+1 >= rtime_i.
|
* Assuming that rtime_i+1 >= rtime_i.
|
||||||
*/
|
*/
|
||||||
static void cputime_adjust(struct task_cputime *curr,
|
void cputime_adjust(struct task_cputime *curr, struct prev_cputime *prev,
|
||||||
struct prev_cputime *prev,
|
u64 *ut, u64 *st)
|
||||||
u64 *ut, u64 *st)
|
|
||||||
{
|
{
|
||||||
u64 rtime, stime, utime;
|
u64 rtime, stime, utime;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче