aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index b60f8a5ae2be..ed90be46fb31 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -3338,6 +3338,16 @@ void account_guest_time(struct task_struct *p, cputime_t cputime)
3338} 3338}
3339 3339
3340/* 3340/*
3341 * Account scaled user cpu time to a process.
3342 * @p: the process that the cpu time gets accounted to
3343 * @cputime: the cpu time spent in user space since the last update
3344 */
3345void account_user_time_scaled(struct task_struct *p, cputime_t cputime)
3346{
3347 p->utimescaled = cputime_add(p->utimescaled, cputime);
3348}
3349
3350/*
3341 * Account system cpu time to a process. 3351 * Account system cpu time to a process.
3342 * @p: the process that the cpu time gets accounted to 3352 * @p: the process that the cpu time gets accounted to
3343 * @hardirq_offset: the offset to subtract from hardirq_count() 3353 * @hardirq_offset: the offset to subtract from hardirq_count()
@@ -3375,6 +3385,17 @@ void account_system_time(struct task_struct *p, int hardirq_offset,
3375} 3385}
3376 3386
3377/* 3387/*
3388 * Account scaled system cpu time to a process.
3389 * @p: the process that the cpu time gets accounted to
3390 * @hardirq_offset: the offset to subtract from hardirq_count()
3391 * @cputime: the cpu time spent in kernel space since the last update
3392 */
3393void account_system_time_scaled(struct task_struct *p, cputime_t cputime)
3394{
3395 p->stimescaled = cputime_add(p->stimescaled, cputime);
3396}
3397
3398/*
3378 * Account for involuntary wait time. 3399 * Account for involuntary wait time.
3379 * @p: the process from which the cpu time has been stolen 3400 * @p: the process from which the cpu time has been stolen
3380 * @steal: the cpu time spent in involuntary wait 3401 * @steal: the cpu time spent in involuntary wait