lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 25 Jun 2009 14:28:09 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
Cc:	linux-mm@...ck.org, linux-kernel@...r.kernel.org,
	nishimura@....nes.nec.co.jp, balbir@...ux.vnet.ibm.com,
	lizf@...fujitsu.com, menage@...gle.com
Subject: Re: [PATCH 0/2] memcg: cgroup fix rmdir hang

On Tue, 23 Jun 2009 16:07:20 +0900
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com> wrote:

> previous discussion was this => http://marc.info/?t=124478543600001&r=1&w=2
> 
> This patch tries to fix problem as
>   - rmdir can sleep very very long if swap entry is shared between multiple
>     cgroups
> 
> Now, cgroup's rmdir path does following
> 
> ==
> again:
> 	check there are no tasks and children group.
> 	call pre_destroy()
> 	check css's refcnt
> 	if (refcnt > 0) {
> 		sleep until css's refcnt goes down to 0.
> 		goto again
> 	}
> ==
> 
> Unfortunately, memory cgroup does following at charge.
> 
> 	css_get(&memcg->css)
> 	....
> 	charge(memcg) (increase USAGE)
> 	...
> And this "memcg" is not necessary to include the caller, task.
> 
> pre_destroy() tries to reduce memory usage until USAGE goes down to 0.
> Then, there is a race that
> 	- css's refcnt > 0 (and memcg's usage > 0)
> 	- rmdir() caller sleeps until css->refcnt goes down 0.
> 	- But to make css->refcnt be 0, pre_destroy() should be called again.
> 
> This patch tries to fix this in asyhcnrounos way (i.e. without big lock.)
> Any comments are welcome.
> 

Do you believe that these fixes should be backported into 2.6.30.x?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ