diff options
Diffstat (limited to 'kernel/sched.c')
-rw-r--r-- | kernel/sched.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 8e2558c2ba67..61e63562f273 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -5944,12 +5944,7 @@ void sched_show_task(struct task_struct *p) | |||
5944 | printk(KERN_CONT " %016lx ", thread_saved_pc(p)); | 5944 | printk(KERN_CONT " %016lx ", thread_saved_pc(p)); |
5945 | #endif | 5945 | #endif |
5946 | #ifdef CONFIG_DEBUG_STACK_USAGE | 5946 | #ifdef CONFIG_DEBUG_STACK_USAGE |
5947 | { | 5947 | free = stack_not_used(p); |
5948 | unsigned long *n = end_of_stack(p); | ||
5949 | while (!*n) | ||
5950 | n++; | ||
5951 | free = (unsigned long)n - (unsigned long)end_of_stack(p); | ||
5952 | } | ||
5953 | #endif | 5948 | #endif |
5954 | printk(KERN_CONT "%5lu %5d %6d\n", free, | 5949 | printk(KERN_CONT "%5lu %5d %6d\n", free, |
5955 | task_pid_nr(p), task_pid_nr(p->real_parent)); | 5950 | task_pid_nr(p), task_pid_nr(p->real_parent)); |
@@ -9490,7 +9485,7 @@ cpuacct_destroy(struct cgroup_subsys *ss, struct cgroup *cgrp) | |||
9490 | 9485 | ||
9491 | static u64 cpuacct_cpuusage_read(struct cpuacct *ca, int cpu) | 9486 | static u64 cpuacct_cpuusage_read(struct cpuacct *ca, int cpu) |
9492 | { | 9487 | { |
9493 | u64 *cpuusage = percpu_ptr(ca->cpuusage, cpu); | 9488 | u64 *cpuusage = per_cpu_ptr(ca->cpuusage, cpu); |
9494 | u64 data; | 9489 | u64 data; |
9495 | 9490 | ||
9496 | #ifndef CONFIG_64BIT | 9491 | #ifndef CONFIG_64BIT |
@@ -9509,7 +9504,7 @@ static u64 cpuacct_cpuusage_read(struct cpuacct *ca, int cpu) | |||
9509 | 9504 | ||
9510 | static void cpuacct_cpuusage_write(struct cpuacct *ca, int cpu, u64 val) | 9505 | static void cpuacct_cpuusage_write(struct cpuacct *ca, int cpu, u64 val) |
9511 | { | 9506 | { |
9512 | u64 *cpuusage = percpu_ptr(ca->cpuusage, cpu); | 9507 | u64 *cpuusage = per_cpu_ptr(ca->cpuusage, cpu); |
9513 | 9508 | ||
9514 | #ifndef CONFIG_64BIT | 9509 | #ifndef CONFIG_64BIT |
9515 | /* | 9510 | /* |
@@ -9604,10 +9599,11 @@ static void cpuacct_charge(struct task_struct *tsk, u64 cputime) | |||
9604 | cpu = task_cpu(tsk); | 9599 | cpu = task_cpu(tsk); |
9605 | ca = task_ca(tsk); | 9600 | ca = task_ca(tsk); |
9606 | 9601 | ||
9607 | for (; ca; ca = ca->parent) { | 9602 | do { |
9608 | u64 *cpuusage = percpu_ptr(ca->cpuusage, cpu); | 9603 | u64 *cpuusage = per_cpu_ptr(ca->cpuusage, cpu); |
9609 | *cpuusage += cputime; | 9604 | *cpuusage += cputime; |
9610 | } | 9605 | ca = ca->parent; |
9606 | } while (ca); | ||
9611 | } | 9607 | } |
9612 | 9608 | ||
9613 | struct cgroup_subsys cpuacct_subsys = { | 9609 | struct cgroup_subsys cpuacct_subsys = { |