From mboxrd@z Thu Jan 1 00:00:00 1970 From: Glauber Costa Subject: Re: [RFD] Merge task counter into memcg Date: Thu, 12 Apr 2012 13:34:50 -0300 Message-ID: <4F87042A.2000902@parallels.com> References: <20120411185715.GA4317@somewhere.redhat.com> <20120412010745.GE1787@cmpxchg.org> <20120412145507.GC11455@somewhere.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20120412145507.GC11455-oHC15RC7JGTpAmv0O++HtFaTQe2KTcn/@public.gmane.org> 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: Frederic Weisbecker Cc: "Daniel P. Berrange" , Containers , Daniel Walsh , Hugh Dickins , LKML , Johannes Weiner , Tejun Heo , Cgroups , Andrew Morton List-Id: containers.vger.kernel.org On 04/12/2012 11:55 AM, Frederic Weisbecker wrote: > I don't know how the kernel stack is allocated for tasks. Do you mean > that we allocate a chunck of it for each new task and we could rely > on that? > More than this: amount of kernel stack is really, really something indirect if what you want to track is # of processes. Now, Hannes made a fair point in his other e-mail about what is a resource and what is not. >> > After all, we would only restrict the number of tasks for the >> > resources they require > It depends if the kernel stack can have other kind of "consumer". > It also depends on what you really want to achieve. If you want to prevent fork bombs, limiting kernel stack will do just fine. Is there anything for which you need to know exactly the number of processes? From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965826Ab2DLQh1 (ORCPT ); Thu, 12 Apr 2012 12:37:27 -0400 Received: from mx2.parallels.com ([64.131.90.16]:44470 "EHLO mx2.parallels.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965806Ab2DLQhY (ORCPT ); Thu, 12 Apr 2012 12:37:24 -0400 Message-ID: <4F87042A.2000902@parallels.com> Date: Thu, 12 Apr 2012 13:34:50 -0300 From: Glauber Costa User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120216 Thunderbird/10.0.1 MIME-Version: 1.0 To: Frederic Weisbecker CC: Johannes Weiner , Hugh Dickins , Andrew Morton , KAMEZAWA Hiroyuki , Tejun Heo , Daniel Walsh , "Daniel P. Berrange" , Li Zefan , LKML , Cgroups , Containers Subject: Re: [RFD] Merge task counter into memcg References: <20120411185715.GA4317@somewhere.redhat.com> <20120412010745.GE1787@cmpxchg.org> <20120412145507.GC11455@somewhere.redhat.com> In-Reply-To: <20120412145507.GC11455@somewhere.redhat.com> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [201.82.19.44] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/12/2012 11:55 AM, Frederic Weisbecker wrote: > I don't know how the kernel stack is allocated for tasks. Do you mean > that we allocate a chunck of it for each new task and we could rely > on that? > More than this: amount of kernel stack is really, really something indirect if what you want to track is # of processes. Now, Hannes made a fair point in his other e-mail about what is a resource and what is not. >> > After all, we would only restrict the number of tasks for the >> > resources they require > It depends if the kernel stack can have other kind of "consumer". > It also depends on what you really want to achieve. If you want to prevent fork bombs, limiting kernel stack will do just fine. Is there anything for which you need to know exactly the number of processes?