From: Ingo Molnar Date: Wed, 8 Apr 2009 15:25:42 +0000 (+0200) Subject: Merge commit 'v2.6.30-rc1' into sched/urgent X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5af8c4e0fac9838428bd718040b664043a05f37c;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git Merge commit 'v2.6.30-rc1' into sched/urgent Merge reason: update to latest upstream to queue up fix Signed-off-by: Ingo Molnar --- 5af8c4e0fac9838428bd718040b664043a05f37c diff --cc kernel/sched.c index 6234d10c6a79,6cc1fd5d5072..5724508c3b66 --- a/kernel/sched.c +++ b/kernel/sched.c @@@ -9764,32 -10092,9 +10199,32 @@@ static void cpuacct_charge(struct task_ ca = task_ca(tsk); for (; ca; ca = ca->parent) { - u64 *cpuusage = percpu_ptr(ca->cpuusage, cpu); + u64 *cpuusage = per_cpu_ptr(ca->cpuusage, cpu); *cpuusage += cputime; } + + rcu_read_unlock(); +} + +/* + * Charge the system/user time to the task's accounting group. + */ +static void cpuacct_update_stats(struct task_struct *tsk, + enum cpuacct_stat_index idx, cputime_t val) +{ + struct cpuacct *ca; + + if (unlikely(!cpuacct_subsys.active)) + return; + + rcu_read_lock(); + ca = task_ca(tsk); + + do { + percpu_counter_add(&ca->cpustat[idx], val); + ca = ca->parent; + } while (ca); + rcu_read_unlock(); } struct cgroup_subsys cpuacct_subsys = {