diff options
Diffstat (limited to 'kernel/sched.c')
-rw-r--r-- | kernel/sched.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 92721d1534b8..12534421d7b5 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -3334,6 +3334,16 @@ void account_guest_time(struct task_struct *p, cputime_t cputime) | |||
3334 | } | 3334 | } |
3335 | 3335 | ||
3336 | /* | 3336 | /* |
3337 | * Account scaled user cpu time to a process. | ||
3338 | * @p: the process that the cpu time gets accounted to | ||
3339 | * @cputime: the cpu time spent in user space since the last update | ||
3340 | */ | ||
3341 | void account_user_time_scaled(struct task_struct *p, cputime_t cputime) | ||
3342 | { | ||
3343 | p->utimescaled = cputime_add(p->utimescaled, cputime); | ||
3344 | } | ||
3345 | |||
3346 | /* | ||
3337 | * Account system cpu time to a process. | 3347 | * Account system cpu time to a process. |
3338 | * @p: the process that the cpu time gets accounted to | 3348 | * @p: the process that the cpu time gets accounted to |
3339 | * @hardirq_offset: the offset to subtract from hardirq_count() | 3349 | * @hardirq_offset: the offset to subtract from hardirq_count() |
@@ -3371,6 +3381,17 @@ void account_system_time(struct task_struct *p, int hardirq_offset, | |||
3371 | } | 3381 | } |
3372 | 3382 | ||
3373 | /* | 3383 | /* |
3384 | * Account scaled system cpu time to a process. | ||
3385 | * @p: the process that the cpu time gets accounted to | ||
3386 | * @hardirq_offset: the offset to subtract from hardirq_count() | ||
3387 | * @cputime: the cpu time spent in kernel space since the last update | ||
3388 | */ | ||
3389 | void account_system_time_scaled(struct task_struct *p, cputime_t cputime) | ||
3390 | { | ||
3391 | p->stimescaled = cputime_add(p->stimescaled, cputime); | ||
3392 | } | ||
3393 | |||
3394 | /* | ||
3374 | * Account for involuntary wait time. | 3395 | * Account for involuntary wait time. |
3375 | * @p: the process from which the cpu time has been stolen | 3396 | * @p: the process from which the cpu time has been stolen |
3376 | * @steal: the cpu time spent in involuntary wait | 3397 | * @steal: the cpu time spent in involuntary wait |