Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 277395
b: refs/heads/master
c: 1c77f38
h: refs/heads/master
i:
  277393: 4ed5f36
  277391: f0cd61c
v: v3
  • Loading branch information
Glauber Costa authored and Ingo Molnar committed Dec 6, 2011
1 parent 8e7c6de commit 43e0e1d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 54c707e98de9ca899e6552a47c797c62c45885ee
refs/heads/master: 1c77f38ad623d8c3bc062f0ff9b8c5a2dfb2f1a2
12 changes: 2 additions & 10 deletions trunk/kernel/sched/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2601,22 +2601,18 @@ 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. */
p->utime = cputime_add(p->utime, 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);
}
Expand Down Expand Up @@ -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 */
Expand Down

0 comments on commit 43e0e1d

Please sign in to comment.