Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 366095
b: refs/heads/master
c: 543bc0e
h: refs/heads/master
i:
  366093: 310c6b6
  366091: c928e59
  366087: 5b222f4
  366079: a507389
v: v3
  • Loading branch information
Li Zefan authored and Ingo Molnar committed Apr 10, 2013
1 parent a92afaa commit aad13fc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 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: 1966aaf7d54608e8ddb7ac454b461840e763409a
refs/heads/master: 543bc0e76e6bb84300eaf9833edc5a481f788678
6 changes: 5 additions & 1 deletion trunk/kernel/sched/cpuacct.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,13 @@ void cpuacct_charge(struct task_struct *tsk, u64 cputime)

ca = task_ca(tsk);

for (; ca; ca = parent_ca(ca)) {
while (true) {
u64 *cpuusage = per_cpu_ptr(ca->cpuusage, cpu);
*cpuusage += cputime;

ca = parent_ca(ca);
if (!ca)
break;
}

rcu_read_unlock();
Expand Down
2 changes: 1 addition & 1 deletion trunk/kernel/sched/cpuacct.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ static inline struct cpuacct *task_ca(struct task_struct *tsk)

static inline struct cpuacct *parent_ca(struct cpuacct *ca)
{
if (!ca || !ca->css.cgroup->parent)
if (!ca->css.cgroup->parent)
return NULL;
return cgroup_ca(ca->css.cgroup->parent);
}
Expand Down

0 comments on commit aad13fc

Please sign in to comment.