Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756914Ab2FPU04 (ORCPT ); Sat, 16 Jun 2012 16:26:56 -0400 Received: from mail-pz0-f46.google.com ([209.85.210.46]:54301 "EHLO mail-pz0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756153Ab2FPU0y (ORCPT ); Sat, 16 Jun 2012 16:26:54 -0400 Date: Sat, 16 Jun 2012 13:26:51 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Aditya Kali cc: Kamezawa Hiroyuki , Andrew Morton , "Aneesh Kumar K.V" , linux-mm@kvack.org, mgorman@suse.de, dhillf@gmail.com, aarcange@redhat.com, mhocko@suse.cz, hannes@cmpxchg.org, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, Ying Han Subject: Re: [PATCH -V6 07/14] memcg: Add HugeTLB extension In-Reply-To: Message-ID: References: <1334573091-18602-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> <1334573091-18602-8-git-send-email-aneesh.kumar@linux.vnet.ibm.com> <20120527202848.GC7631@skywalker.linux.vnet.ibm.com> <87lik920h8.fsf@skywalker.in.ibm.com> <20120608160612.dea6d1ce.akpm@linux-foundation.org> <4FD56C19.4060307@jp.fujitsu.com> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1487 Lines: 29 On Fri, 15 Jun 2012, Aditya Kali wrote: > Based on the usecase at Google, I see a definite value in including > hugepage usage in memory.usage_in_bytes as well and having a single > limit for memory usage for the job. Our jobs wants to specify only one > (total) memory limit (including slab usage, and other kernel memory > usage, hugepages, etc.). > > The hugepage/smallpage requirements of the job vary during its > lifetime. Having two different limits means less flexibility for jobs > as they now have to specify their limit as (max_hugepage, > max_smallpage) instead of max(hugepage + smallpage). Two limits > complicates the API for the users and requires them to over-specify > the resources. > If a large number of hugepages, for example, are allocated on the command line because there's a lower success rate of dynamic allocation due to fragmentation, with your suggestion it would no longer allow the admin to restrict the use of those hugepages to only a particular set of tasks. Consider especially 1GB hugepagez on x86, your suggestion would treat a single 1GB hugepage which cannot be freed after boot exactly the same as using 1GB of memory which is obviously not the desired behavior of any hugetlb controller. -- 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/