summaryrefslogtreecommitdiffstats
path: root/kernel/sched
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sched')
-rw-r--r--kernel/sched/core.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 3e078f26cb6..6e860100d11 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -2601,8 +2601,6 @@ static inline void task_group_account_field(struct task_struct *p,
void account_user_time(struct task_struct *p, cputime_t cputime,
cputime_t cputime_scaled)
{
- u64 *cpustat = kcpustat_this_cpu->cpustat;
- u64 tmp;
int index;
/* Add user time to process. */
@@ -2610,13 +2608,11 @@ void account_user_time(struct task_struct *p, cputime_t cputime,
p->utimescaled = cputime_add(p->utimescaled, cputime_scaled);
account_group_user_time(p, cputime);
- /* Add user time to cpustat. */
- tmp = cputime_to_cputime64(cputime);
-
index = (TASK_NICE(p) > 0) ? CPUTIME_NICE : CPUTIME_USER;
- cpustat[index] += tmp;
+ /* Add user time to cpustat. */
task_group_account_field(p, index, cputime);
+
/* Account for user time used */
acct_update_integrals(p);
}
@@ -2662,16 +2658,12 @@ static inline
void __account_system_time(struct task_struct *p, cputime_t cputime,
cputime_t cputime_scaled, int index)
{
- u64 tmp = cputime_to_cputime64(cputime);
- u64 *cpustat = kcpustat_this_cpu->cpustat;
-
/* Add system time to process. */
p->stime = cputime_add(p->stime, cputime);
p->stimescaled = cputime_add(p->stimescaled, cputime_scaled);
account_group_system_time(p, cputime);
/* Add system time to cpustat. */
- cpustat[index] += tmp;
task_group_account_field(p, index, cputime);
/* Account for system time used */