Revision 94b3dd0f7bb393d93e84a173b1df9b8b64c83ac4 authored by Greg Thelen on 04 June 2010, 21:15:03 UTC, committed by Linus Torvalds on 04 June 2010, 22:21:45 UTC
Child groups should have a greater depth than their parents. Prior to this change, the parent would incorrectly report zero memory usage for child cgroups when use_hierarchy is enabled. test script: mount -t cgroup none /cgroups -o memory cd /cgroups mkdir cg1 echo 1 > cg1/memory.use_hierarchy mkdir cg1/cg11 echo $$ > cg1/cg11/tasks dd if=/dev/zero of=/tmp/foo bs=1M count=1 echo echo CHILD grep cache cg1/cg11/memory.stat echo echo PARENT grep cache cg1/memory.stat echo $$ > tasks rmdir cg1/cg11 cg1 cd / umount /cgroups Using fae9c79, a recent patch that changed alloc_css_id() depth computation, the parent incorrectly reports zero usage: root@ubuntu:~# ./test 1+0 records in 1+0 records out 1048576 bytes (1.0 MB) copied, 0.0151844 s, 69.1 MB/s CHILD cache 1048576 total_cache 1048576 PARENT cache 0 total_cache 0 With this patch, the parent correctly includes child usage: root@ubuntu:~# ./test 1+0 records in 1+0 records out 1048576 bytes (1.0 MB) copied, 0.0136827 s, 76.6 MB/s CHILD cache 1052672 total_cache 1052672 PARENT cache 0 total_cache 1052672 Signed-off-by: Greg Thelen <gthelen@google.com> Acked-by: Paul Menage <menage@google.com> Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Acked-by: Li Zefan <lizf@cn.fujitsu.com> Cc: <stable@kernel.org> [2.6.34.x] Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 007d086
File | Mode | Size |
---|---|---|
debug | ||
gcov | ||
irq | ||
power | ||
time | ||
trace | ||
.gitignore | -rw-r--r-- | 63 bytes |
Kconfig.freezer | -rw-r--r-- | 52 bytes |
Kconfig.hz | -rw-r--r-- | 1.7 KB |
Kconfig.locks | -rw-r--r-- | 4.5 KB |
Kconfig.preempt | -rw-r--r-- | 2.0 KB |
Makefile | -rw-r--r-- | 5.1 KB |
acct.c | -rw-r--r-- | 17.1 KB |
async.c | -rw-r--r-- | 10.9 KB |
audit.c | -rw-r--r-- | 39.5 KB |
audit.h | -rw-r--r-- | 5.8 KB |
audit_tree.c | -rw-r--r-- | 21.0 KB |
audit_watch.c | -rw-r--r-- | 14.4 KB |
auditfilter.c | -rw-r--r-- | 33.3 KB |
auditsc.c | -rw-r--r-- | 66.0 KB |
backtracetest.c | -rw-r--r-- | 2.1 KB |
bounds.c | -rw-r--r-- | 530 bytes |
capability.c | -rw-r--r-- | 8.1 KB |
cgroup.c | -rw-r--r-- | 126.2 KB |
cgroup_freezer.c | -rw-r--r-- | 9.8 KB |
compat.c | -rw-r--r-- | 28.2 KB |
configs.c | -rw-r--r-- | 2.8 KB |
cpu.c | -rw-r--r-- | 13.8 KB |
cpuset.c | -rw-r--r-- | 74.4 KB |
cred.c | -rw-r--r-- | 21.1 KB |
delayacct.c | -rw-r--r-- | 4.9 KB |
dma.c | -rw-r--r-- | 3.6 KB |
early_res.c | -rw-r--r-- | 13.8 KB |
elfcore.c | -rw-r--r-- | 459 bytes |
exec_domain.c | -rw-r--r-- | 4.5 KB |
exit.c | -rw-r--r-- | 43.7 KB |
extable.c | -rw-r--r-- | 3.2 KB |
fork.c | -rw-r--r-- | 41.5 KB |
freezer.c | -rw-r--r-- | 3.8 KB |
futex.c | -rw-r--r-- | 68.3 KB |
futex_compat.c | -rw-r--r-- | 4.5 KB |
groups.c | -rw-r--r-- | 6.0 KB |
hrtimer.c | -rw-r--r-- | 45.9 KB |
hung_task.c | -rw-r--r-- | 5.1 KB |
hw_breakpoint.c | -rw-r--r-- | 14.0 KB |
itimer.c | -rw-r--r-- | 7.3 KB |
kallsyms.c | -rw-r--r-- | 12.9 KB |
kexec.c | -rw-r--r-- | 38.7 KB |
kfifo.c | -rw-r--r-- | 11.4 KB |
kmod.c | -rw-r--r-- | 11.7 KB |
kprobes.c | -rw-r--r-- | 50.0 KB |
ksysfs.c | -rw-r--r-- | 4.9 KB |
kthread.c | -rw-r--r-- | 6.6 KB |
latencytop.c | -rw-r--r-- | 7.7 KB |
lockdep.c | -rw-r--r-- | 91.5 KB |
lockdep_internals.h | -rw-r--r-- | 4.5 KB |
lockdep_proc.c | -rw-r--r-- | 17.2 KB |
lockdep_states.h | -rw-r--r-- | 233 bytes |
module.c | -rw-r--r-- | 78.8 KB |
mutex-debug.c | -rw-r--r-- | 2.9 KB |
mutex-debug.h | -rw-r--r-- | 1.7 KB |
mutex.c | -rw-r--r-- | 13.4 KB |
mutex.h | -rw-r--r-- | 1.3 KB |
notifier.c | -rw-r--r-- | 16.9 KB |
ns_cgroup.c | -rw-r--r-- | 2.5 KB |
nsproxy.c | -rw-r--r-- | 5.3 KB |
padata.c | -rw-r--r-- | 17.1 KB |
panic.c | -rw-r--r-- | 10.0 KB |
params.c | -rw-r--r-- | 18.4 KB |
perf_event.c | -rw-r--r-- | 132.8 KB |
pid.c | -rw-r--r-- | 12.7 KB |
pid_namespace.c | -rw-r--r-- | 4.4 KB |
pm_qos_params.c | -rw-r--r-- | 11.4 KB |
posix-cpu-timers.c | -rw-r--r-- | 42.7 KB |
posix-timers.c | -rw-r--r-- | 29.1 KB |
printk.c | -rw-r--r-- | 38.2 KB |
profile.c | -rw-r--r-- | 16.6 KB |
ptrace.c | -rw-r--r-- | 19.9 KB |
range.c | -rw-r--r-- | 2.9 KB |
rcupdate.c | -rw-r--r-- | 3.5 KB |
rcutiny.c | -rw-r--r-- | 7.5 KB |
rcutiny_plugin.h | -rw-r--r-- | 1.3 KB |
rcutorture.c | -rw-r--r-- | 38.5 KB |
rcutree.c | -rw-r--r-- | 57.0 KB |
rcutree.h | -rw-r--r-- | 15.2 KB |
rcutree_plugin.h | -rw-r--r-- | 31.9 KB |
rcutree_trace.c | -rw-r--r-- | 9.5 KB |
relay.c | -rw-r--r-- | 32.7 KB |
res_counter.c | -rw-r--r-- | 3.8 KB |
resource.c | -rw-r--r-- | 23.4 KB |
rtmutex-debug.c | -rw-r--r-- | 5.8 KB |
rtmutex-debug.h | -rw-r--r-- | 1.4 KB |
rtmutex-tester.c | -rw-r--r-- | 9.1 KB |
rtmutex.c | -rw-r--r-- | 29.4 KB |
rtmutex.h | -rw-r--r-- | 1.1 KB |
rtmutex_common.h | -rw-r--r-- | 3.7 KB |
rwsem.c | -rw-r--r-- | 2.6 KB |
sched.c | -rw-r--r-- | 213.4 KB |
sched_clock.c | -rw-r--r-- | 5.6 KB |
sched_cpupri.c | -rw-r--r-- | 5.5 KB |
sched_cpupri.h | -rw-r--r-- | 945 bytes |
sched_debug.c | -rw-r--r-- | 11.1 KB |
sched_fair.c | -rw-r--r-- | 93.7 KB |
sched_features.h | -rw-r--r-- | 1.6 KB |
sched_idletask.c | -rw-r--r-- | 2.6 KB |
sched_rt.c | -rw-r--r-- | 40.4 KB |
sched_stats.h | -rw-r--r-- | 10.6 KB |
seccomp.c | -rw-r--r-- | 1.6 KB |
semaphore.c | -rw-r--r-- | 7.2 KB |
signal.c | -rw-r--r-- | 69.3 KB |
slow-work-debugfs.c | -rw-r--r-- | 5.3 KB |
slow-work.c | -rw-r--r-- | 30.4 KB |
slow-work.h | -rw-r--r-- | 1.8 KB |
smp.c | -rw-r--r-- | 13.4 KB |
softirq.c | -rw-r--r-- | 21.2 KB |
softlockup.c | -rw-r--r-- | 7.1 KB |
spinlock.c | -rw-r--r-- | 9.5 KB |
srcu.c | -rw-r--r-- | 9.7 KB |
stacktrace.c | -rw-r--r-- | 896 bytes |
stop_machine.c | -rw-r--r-- | 12.9 KB |
sys.c | -rw-r--r-- | 38.3 KB |
sys_ni.c | -rw-r--r-- | 5.1 KB |
sysctl.c | -rw-r--r-- | 68.4 KB |
sysctl_binary.c | -rw-r--r-- | 51.9 KB |
sysctl_check.c | -rw-r--r-- | 4.4 KB |
taskstats.c | -rw-r--r-- | 13.8 KB |
test_kprobes.c | -rw-r--r-- | 8.4 KB |
time.c | -rw-r--r-- | 18.8 KB |
timeconst.pl | -rw-r--r-- | 7.2 KB |
timer.c | -rw-r--r-- | 46.3 KB |
tracepoint.c | -rw-r--r-- | 15.9 KB |
tsacct.c | -rw-r--r-- | 4.3 KB |
uid16.c | -rw-r--r-- | 5.3 KB |
up.c | -rw-r--r-- | 413 bytes |
user-return-notifier.c | -rw-r--r-- | 1.3 KB |
user.c | -rw-r--r-- | 4.7 KB |
user_namespace.c | -rw-r--r-- | 2.2 KB |
utsname.c | -rw-r--r-- | 1.6 KB |
utsname_sysctl.c | -rw-r--r-- | 2.5 KB |
wait.c | -rw-r--r-- | 8.2 KB |
workqueue.c | -rw-r--r-- | 30.1 KB |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...