Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751362AbWH3TZp (ORCPT ); Wed, 30 Aug 2006 15:25:45 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751369AbWH3TZp (ORCPT ); Wed, 30 Aug 2006 15:25:45 -0400 Received: from e36.co.us.ibm.com ([32.97.110.154]:28342 "EHLO e36.co.us.ibm.com") by vger.kernel.org with ESMTP id S1751362AbWH3TZa (ORCPT ); Wed, 30 Aug 2006 15:25:30 -0400 Subject: Re: [ckrm-tech] [PATCH 6/7] BC: kernel memory (core) From: Chandra Seetharaman Reply-To: sekharan@us.ibm.com To: Kirill Korotaev Cc: Andrew Morton , Rik van Riel , CKRM-Tech , Linux Kernel Mailing List , Andi Kleen , Christoph Hellwig , Andrey Savochkin , Alan Cox , Matt Helsley , Alexey Dobriyan , Oleg Nesterov , devel@openvz.org, Pavel Emelianov In-Reply-To: <44F45601.9060807@sw.ru> References: <44F45045.70402@sw.ru> <44F45601.9060807@sw.ru> Content-Type: text/plain Organization: IBM Date: Wed, 30 Aug 2006 12:25:26 -0700 Message-Id: <1156965926.12403.51.camel@linuxchandra> Mime-Version: 1.0 X-Mailer: Evolution 2.0.4 (2.0.4-7) Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1679 Lines: 53 On Tue, 2006-08-29 at 18:58 +0400, Kirill Korotaev wrote: > --- ./include/bc/beancounter.h.bckmem 2006-08-28 12:47:52.000000000 +0400 > +++ ./include/bc/beancounter.h 2006-08-28 12:59:28.000000000 +0400 > @@ -12,7 +12,9 @@ > * Resource list. > */ > > -#define BC_RESOURCES 0 > +#define BC_KMEMSIZE 0 > + > +#define BC_RESOURCES 1 > --- ./kernel/bc/beancounter.c.bckmem 2006-08-28 12:52:11.000000000 +0400 > +++ ./kernel/bc/beancounter.c 2006-08-28 12:59:28.000000000 +0400 > @@ -20,6 +20,7 @@ static void init_beancounter_struct(stru > struct beancounter init_bc; > > const char *bc_rnames[] = { > + "kmemsize", /* 0 */ > }; > > static struct hlist_head bc_hash[BC_HASH_SIZE]; > @@ -221,6 +222,8 @@ static void init_beancounter_syslimits(s > { > int k; > > + bc->bc_parms[BC_KMEMSIZE].limit = 32 * 1024 * 1024; > + > for (k = 0; k < BC_RESOURCES; k++) > bc->bc_parms[k].barrier = bc->bc_parms[k].limit; > } As I mentioned in one of my earlier email (http://marc.theaimsgroup.com/?l=linux-kernel&m=115619384500289&w=2), IMHO, this way of defining an interface is not clean/clear (for controller writers). -- ---------------------------------------------------------------------- Chandra Seetharaman | Be careful what you choose.... - sekharan@us.ibm.com | .......you may get it. ---------------------------------------------------------------------- - 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/