From mboxrd@z Thu Jan 1 00:00:00 1970 From: Balbir Singh Subject: Re: [-mm PATCH] Memory controller improve user interface Date: Thu, 30 Aug 2007 03:34:12 +0530 Message-ID: <46D5ED5C.9030405@linux.vnet.ibm.com> References: <20070829111030.9987.8104.sendpatchset@balbir-laptop> <1188413148.28903.113.camel@localhost> Reply-To: balbir-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1188413148.28903.113.camel@localhost> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Dave Hansen Cc: Linux Kernel Mailing List , Linux MM Mailing List , David Rientjes , Linux Containers , Andrew Morton , Paul Menage List-Id: containers.vger.kernel.org Dave Hansen wrote: > On Wed, 2007-08-29 at 16:40 +0530, Balbir Singh wrote: >> >> @@ -352,7 +353,7 @@ int mem_container_charge(struct page *pa >> kfree(pc); >> pc = race_pc; >> atomic_inc(&pc->ref_cnt); >> - res_counter_uncharge(&mem->res, 1); >> + res_counter_uncharge(&mem->res, MEM_CONTAINER_CHARGE_KB); >> css_put(&mem->css); >> goto done; >> } > > Do these changes really need to happen anywhere besides the > user<->kernel boundary? Why can't internal tracking be in pages? I've thought about this before. The problem is that a user could set his limit to 10000 bytes, but would then see the usage and limit round to the closest page boundary. This can be confusing to a user. -- Warm Regards, Balbir Singh Linux Technology Center IBM, ISTL