From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx163.postini.com [74.125.245.163]) by kanga.kvack.org (Postfix) with SMTP id D2B596B0044 for ; Tue, 24 Apr 2012 21:34:23 -0400 (EDT) Received: from m3.gw.fujitsu.co.jp (unknown [10.0.50.73]) by fgwmail5.fujitsu.co.jp (Postfix) with ESMTP id 6E4CE3EE0C0 for ; Wed, 25 Apr 2012 10:34:22 +0900 (JST) Received: from smail (m3 [127.0.0.1]) by outgoing.m3.gw.fujitsu.co.jp (Postfix) with ESMTP id 4E9D745DE7E for ; Wed, 25 Apr 2012 10:34:22 +0900 (JST) Received: from s3.gw.fujitsu.co.jp (s3.gw.fujitsu.co.jp [10.0.50.93]) by m3.gw.fujitsu.co.jp (Postfix) with ESMTP id 220ED45DEA6 for ; Wed, 25 Apr 2012 10:34:22 +0900 (JST) Received: from s3.gw.fujitsu.co.jp (localhost.localdomain [127.0.0.1]) by s3.gw.fujitsu.co.jp (Postfix) with ESMTP id DA138E08005 for ; Wed, 25 Apr 2012 10:34:21 +0900 (JST) Received: from m107.s.css.fujitsu.com (m107.s.css.fujitsu.com [10.240.81.147]) by s3.gw.fujitsu.co.jp (Postfix) with ESMTP id 324E61DB803E for ; Wed, 25 Apr 2012 10:34:21 +0900 (JST) Message-ID: <4F975430.4090107@jp.fujitsu.com> Date: Wed, 25 Apr 2012 10:32:32 +0900 From: KAMEZAWA Hiroyuki MIME-Version: 1.0 Subject: Re: [PATCH 09/23] kmem slab accounting basic infrastructure References: <1334959051-18203-1-git-send-email-glommer@parallels.com> <1334959051-18203-10-git-send-email-glommer@parallels.com> In-Reply-To: <1334959051-18203-10-git-send-email-glommer@parallels.com> Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Glauber Costa Cc: cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, devel@openvz.org, Michal Hocko , Johannes Weiner , Frederic Weisbecker , Greg Thelen , Suleiman Souhlal (2012/04/21 6:57), Glauber Costa wrote: > This patch adds the basic infrastructure for the accounting of the slab > caches. To control that, the following files are created: > > * memory.kmem.usage_in_bytes > * memory.kmem.limit_in_bytes > * memory.kmem.failcnt > * memory.kmem.max_usage_in_bytes > > They have the same meaning of their user memory counterparts. They reflect > the state of the "kmem" res_counter. > > The code is not enabled until a limit is set. This can be tested by the flag > "kmem_accounted". This means that after the patch is applied, no behavioral > changes exists for whoever is still using memcg to control their memory usage. > Hmm, res_counter never goes naeative ? > We always account to both user and kernel resource_counters. This effectively > means that an independent kernel limit is in place when the limit is set > to a lower value than the user memory. A equal or higher value means that the > user limit will always hit first, meaning that kmem is effectively unlimited. > > People who want to track kernel memory but not limit it, can set this limit > to a very high number (like RESOURCE_MAX - 1page - that no one will ever hit, > or equal to the user memory) > > Signed-off-by: Glauber Costa > CC: Michal Hocko > CC: Kamezawa Hiroyuki > CC: Johannes Weiner The code itself seems fine. Reviewed-by: KAMEZAWA Hiroyuki -- 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/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org