Re: [RFC][BUGFIX] memcg: rmdir doesn't return

KAMEZAWA Hiroyuki
2009-06-17T09:07:18Z

On Wed, 17 Jun 2009 13:05:21 +0530
Balbir Singh <balbir@linux.vnet.ibm.com> wrote:

> * KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> [2009-06-17 15:27:48]:

> > And even if release_agent() is called, it will do rmdir and see -EBUSY.
>
> Because of hierarchy? But we need to cleanup hierarchy before rmdir()
> no?
>

Assume following (I think my patch in git explains this.)

/cgroup/A/01
/02
/03
/04
A and 01,02,03,04 is under hierarchy.

Now, 04 has no task and it can be removed by rmdir.
Case 1) 01,02,03 hits memory limit heavily and hirerchical memory recalim
walks. In this case, 04's css refcnt is got/put very often.
Case 2) read statistics of cgroup/A very frequently, this means
css_put/get is called very often agatinst 04.

Case 3)....

04's refcnt is put/get when other group under hierarchy is busy and
rmdir against 04 returns -EBUSY in some amount of possiblitly.

Thanks,
-Kame