From mboxrd@z Thu Jan 1 00:00:00 1970 From: Frederic Weisbecker Subject: Re: [RFD] Merge task counter into memcg Date: Wed, 18 Apr 2012 08:54:33 +0200 Message-ID: <20120418065430.GB25568__6790.719604078$1334732087$gmane$org@somewhere> References: <20120411185715.GA4317@somewhere.redhat.com> <20120412010745.GE1787@cmpxchg.org> <20120412145507.GC11455@somewhere.redhat.com> <4F87042A.2000902@parallels.com> <20120412165922.GA12484@somewhere.redhat.com> <20120417151753.GB32402@google.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20120417151753.GB32402-hpIqsD4AKlfQT0dZR+AlfA@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: Tejun Heo Cc: "Daniel P. Berrange" , Containers , Daniel Walsh , Hugh Dickins , LKML , Johannes Weiner , Cgroups , Andrew Morton List-Id: containers.vger.kernel.org On Tue, Apr 17, 2012 at 08:17:53AM -0700, Tejun Heo wrote: > Hello, Frederic. > > On Thu, Apr 12, 2012 at 06:59:27PM +0200, Frederic Weisbecker wrote: > > I want: > > > > a) to prevent the forkbomb from going far enough to DDOS the machine > > b) to be able to kill that forkbomb once detected, in one go without race > > against concurrent forks. > > > > I think a) can work just fine with kernel stack limiting. I also need > > to be notified about the fact we reached the limit. And b) should > > be feasible with the help of the cgroup freezer. > > kmem allocation fail after reaching the limit which in turn should > fail task creation. Isn't that the same effect as the task_counter as > implemented? That's it. > > > > Is there anything for which you need to know exactly the number of > > > processes? > > > > No that's really about prevent/kill forkbomb as far as I'm concerned. > > Hmm... so, accounting overhead aside, if the only purpose is > preventing the whole machine being brought down by a fork bomb, kmem > limiting is enough, right? I think so yeah.