https://github.com/torvalds/linux
Revision 887032670d47366a8c8f25396ea7c14b7b2cc620 authored by KAMEZAWA Hiroyuki on 29 July 2009, 22:04:06 UTC, committed by Linus Torvalds on 30 July 2009, 02:10:35 UTC
After commit ec64f51545fffbc4cb968f0cea56341a4b07e85a ("cgroup: fix
frequent -EBUSY at rmdir"), cgroup's rmdir (especially against memcg)
doesn't return -EBUSY by temporary ref counts.  That commit expects all
refs after pre_destroy() is temporary but...it wasn't.  Then, rmdir can
wait permanently.  This patch tries to fix that and change followings.

 - set CGRP_WAIT_ON_RMDIR flag before pre_destroy().
 - clear CGRP_WAIT_ON_RMDIR flag when the subsys finds racy case.
   if there are sleeping ones, wakes them up.
 - rmdir() sleeps only when CGRP_WAIT_ON_RMDIR flag is set.

Tested-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Reported-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Reviewed-by: Paul Menage <menage@google.com>
Acked-by: Balbir Sigh <balbir@linux.vnet.ibm.com>
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent f0d8367
History
Tip revision: 887032670d47366a8c8f25396ea7c14b7b2cc620 authored by KAMEZAWA Hiroyuki on 29 July 2009, 22:04:06 UTC
cgroup avoid permanent sleep at rmdir
Tip revision: 8870326
File Mode Size
.gitignore -rw-r--r-- 102 bytes
Kconfig -rw-r--r-- 4.4 KB
Makefile -rw-r--r-- 2.1 KB
gen_init_cpio.c -rw-r--r-- 12.2 KB
initramfs_data.S -rw-r--r-- 1021 bytes
initramfs_data.bz2.S -rw-r--r-- 1.0 KB
initramfs_data.gz.S -rw-r--r-- 1023 bytes
initramfs_data.lzma.S -rw-r--r-- 1.0 KB

back to top