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]
Message-Id: <20081112160758.3dca0b22.akpm@linux-foundation.org>
Date:	Wed, 12 Nov 2008 16:07:58 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
Cc:	kamezawa.hiroyu@...fujitsu.com, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org, balbir@...ux.vnet.ibm.com,
	nishimura@....nes.nec.co.jp, menage@...gle.com
Subject: Re: [RFC][PATCH 1/6] memcg: free all at rmdir

On Wed, 12 Nov 2008 12:26:56 +0900
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com> wrote:

> +5.1 on_rmdir
> +set behavior of memcg at rmdir (Removing cgroup) default is "drop".
> +
> +5.1.1 drop
> +       #echo on_rmdir drop > memory.attribute
> +       This is default. All pages on the memcg will be freed.
> +       If pages are locked or too busy, they will be moved up to the parent.
> +       Useful when you want to drop (large) page caches used in this memcg.
> +       But some of in-use page cache can be dropped by this.
> +
> +5.1.2 keep
> +       #echo on_rmdir keep > memory.attribute
> +       All pages on the memcg will be moved to its parent.
> +       Useful when you don't want to drop page caches used in this memcg.
> +       You can keep page caches from some library or DB accessed by this
> +       memcg on memory.

Would it not be more useful to implement a per-memcg version of
/proc/sys/vm/drop_caches?  (One without drop_caches' locking bug,
hopefully).

If we do this then we can make the above "keep" behaviour non-optional,
and the operator gets to choose whether or not to drop the caches
before doing the rmdir.

Plus, we get a new per-memcg drop_caches capability.  And it's a nicer
interface, and it doesn't have the obvious races which on_rmdir has,
etc.

hm?
--
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