From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail137.messagelabs.com (mail137.messagelabs.com [216.82.249.19]) by kanga.kvack.org (Postfix) with ESMTP id 1F8256B0047 for ; Wed, 7 Jan 2009 13:41:21 -0500 (EST) Received: from d28relay04.in.ibm.com (d28relay04.in.ibm.com [9.184.220.61]) by e28smtp02.in.ibm.com (8.13.1/8.13.1) with ESMTP id n07IfFP0017706 for ; Thu, 8 Jan 2009 00:11:15 +0530 Received: from d28av03.in.ibm.com (d28av03.in.ibm.com [9.184.220.65]) by d28relay04.in.ibm.com (8.13.8/8.13.8/NCO v9.1) with ESMTP id n07IfJDD4280352 for ; Thu, 8 Jan 2009 00:11:19 +0530 Received: from d28av03.in.ibm.com (loopback [127.0.0.1]) by d28av03.in.ibm.com (8.13.1/8.13.3) with ESMTP id n07IfEln027557 for ; Thu, 8 Jan 2009 05:41:14 +1100 From: Balbir Singh Date: Thu, 08 Jan 2009 00:11:16 +0530 Message-Id: <20090107184116.18062.8379.sendpatchset@localhost.localdomain> In-Reply-To: <20090107184110.18062.41459.sendpatchset@localhost.localdomain> References: <20090107184110.18062.41459.sendpatchset@localhost.localdomain> Subject: [RFC][PATCH 1/4] Memory controller soft limit documentation Sender: owner-linux-mm@kvack.org To: Andrew Morton Cc: Sudhir Kumar , YAMAMOTO Takashi , Paul Menage , lizf@cn.fujitsu.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, David Rientjes , Pavel Emelianov , Balbir Singh , KAMEZAWA Hiroyuki List-ID: From: Balbir Singh Add documentation for soft limit feature support. Signed-off-by: Balbir Singh --- Documentation/controllers/memory.txt | 28 ++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff -puN Documentation/controllers/memory.txt~memcg-soft-limit-documentation Documentation/controllers/memory.txt --- a/Documentation/controllers/memory.txt~memcg-soft-limit-documentation +++ a/Documentation/controllers/memory.txt @@ -360,7 +360,33 @@ cgroups created below it. NOTE2: This feature can be enabled/disabled per subtree. -7. TODO +7. Soft limits + +Soft limits allow for greater sharing of memory. The idea behind soft limits +is to allow control groups to use as much of the memory as needed, provided + +a. There is no memory contention +b. They do not exceed their hard limit + +When the system detects memory contention (through do_try_to_free_pages(), +while allocating), control groups are pushed back to their soft limits if +possible. If the soft limit of each control group is very high, they are +pushed back as much as possible to make sure that one control group does not +starve the others. + +7.1 Interface + +Soft limits can be setup by using the following commands (in this example we +assume a soft limit of 256 megabytes) + +# echo 256M > memory.soft_limit_in_bytes + +If we want to change this to 1G, we can at any time use + +# echo 1G > memory.soft_limit_in_bytes + + +8. TODO 1. Add support for accounting huge pages (as a separate controller) 2. Make per-cgroup scanner reclaim not-shared pages first _ -- Balbir -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org