Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755368AbYFLEzY (ORCPT ); Thu, 12 Jun 2008 00:55:24 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751404AbYFLEzJ (ORCPT ); Thu, 12 Jun 2008 00:55:09 -0400 Received: from fgwmail5.fujitsu.co.jp ([192.51.44.35]:59469 "EHLO fgwmail5.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751398AbYFLEzI (ORCPT ); Thu, 12 Jun 2008 00:55:08 -0400 Date: Thu, 12 Jun 2008 14:00:48 +0900 From: KAMEZAWA Hiroyuki To: Randy Dunlap Cc: "linux-mm@kvack.org" , LKML , "balbir@linux.vnet.ibm.com" , "menage@google.com" , "xemul@openvz.org" , "yamamoto@valinux.co.jp" Subject: Re: [RFC][PATCH 2/2] memcg: hardwall hierarhcy for memcg Message-Id: <20080612140048.0051feb2.kamezawa.hiroyu@jp.fujitsu.com> In-Reply-To: <20080611162423.3ba183b4.randy.dunlap@oracle.com> References: <20080604135815.498eaf82.kamezawa.hiroyu@jp.fujitsu.com> <20080604140329.8db1b67e.kamezawa.hiroyu@jp.fujitsu.com> <20080611162423.3ba183b4.randy.dunlap@oracle.com> Organization: Fujitsu X-Mailer: Sylpheed 2.4.2 (GTK+ 2.10.11; i686-pc-mingw32) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3152 Lines: 88 Thank you. will fix. -Kame On Wed, 11 Jun 2008 16:24:23 -0700 Randy Dunlap wrote: > On Wed, 4 Jun 2008 14:03:29 +0900 KAMEZAWA Hiroyuki wrote: > > > --- > > Documentation/controllers/memory.txt | 27 +++++- > > mm/memcontrol.c | 156 ++++++++++++++++++++++++++++++++++- > > 2 files changed, 178 insertions(+), 5 deletions(-) > > > > > Index: temp-2.6.26-rc2-mm1/Documentation/controllers/memory.txt > > =================================================================== > > --- temp-2.6.26-rc2-mm1.orig/Documentation/controllers/memory.txt > > +++ temp-2.6.26-rc2-mm1/Documentation/controllers/memory.txt > > @@ -237,12 +237,37 @@ cgroup might have some charge associated > > tasks have migrated away from it. Such charges are automatically dropped at > > rmdir() if there are no tasks. > > > > -5. TODO > > +5. Hierarchy Model > > + the kernel supports following kinds of hierarchy models. > > The kernel supports the following kinds .... > > > + (your middle-ware may support others based on this.) > > (Your > > + > > + 5-a. Independent Hierarchy > > + There are no relationship between any cgroups, even among a parent and > > is > > > + children. This is the default mode. To use this hierarchy, write 0 > > + to root cgroup's memory.hierarchy_model > > + echo 0 > .../memory.hierarchy_model. > > + > > + 5-b. Hardwall Hierarchy. > > + The resource has to be moved from the parent to the child before use it. > > using it. > > > + When a child's limit is set to 'val', val of the resource is moved from > > + the parent to the child. the parent's usage += val. > > The parent's usage is incremented by val. > (if that's what you mean) > > > + The amount of children's usage is reported by the file > > + > > + - memory.assigned_to_child > > + > > + This policy doesn't provide sophisticated automatic resource balancing in > > + the kernel. But this is very good for strict resource isolation. Users > > kernel, but this ... > > > + can get high predictability of behavior of applications if this is used > > + under proper environments. > > + > > + > > +6. TODO > > > > 1. Add support for accounting huge pages (as a separate controller) > > 2. Make per-cgroup scanner reclaim not-shared pages first > > 3. Teach controller to account for shared-pages > > 4. Start reclamation when the limit is lowered > > + (this is already done in Hardwall Hierarchy) > > 5. Start reclamation in the background when the limit is > > not yet hit but the usage is getting closer > > -- > > --- > ~Randy > '"Daemon' is an old piece of jargon from the UNIX operating system, > where it referred to a piece of low-level utility software, a > fundamental part of the operating system." -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/