Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751929AbbKONgs (ORCPT ); Sun, 15 Nov 2015 08:36:48 -0500 Received: from mail-io0-f175.google.com ([209.85.223.175]:36544 "EHLO mail-io0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751322AbbKONgp (ORCPT ); Sun, 15 Nov 2015 08:36:45 -0500 MIME-Version: 1.0 X-Originating-IP: [122.106.150.15] In-Reply-To: <56424B83.2080504@gmail.com> References: <144716440621.20175.1000688899886388119.stgit@rabbit.intern.cm-ag> <5642142F.2090302@gmail.com> <56424B83.2080504@gmail.com> Date: Mon, 16 Nov 2015 00:36:44 +1100 Message-ID: Subject: Re: [PATCH] cgroup_pids: add fork limit From: Aleksa Sarai To: Austin S Hemmelgarn Cc: Parav Pandit , Max Kellermann , Tejun Heo , cgroups@vger.kernel.org, lizefan@huawei.com, Johannes Weiner , max@duempel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1449 Lines: 31 >> If so, could you share little more insight on how that time measure >> outside of the cpu's cgroup cycles? Just so that its helpful to wider >> audience. > > Well, there are a number of things that I can think of that the kernel does > on behalf of processes that can consume processor time that isn't trivial to > account: > * Updating timers on behalf of userspace processes (itimers or similar). > * Sending certain kernel generated signals to processes (that is, stuff > generated by the kernel like SIGFPE, SIGSEGV, and so forth). > * Queuing events from dnotify/inotify/fanotify. > * TLB misses, page faults, and swapping. > * Setting up new processes prior to them actually running. > * Scheduling. > All of these are things that fork-bombs can and (other than TLB misses) do > exploit to bring a system down, and the cpu cgroup is by no means a magic > bullet to handle this. I feel like these are backed by different resources, and we should work on limiting those *at the source* in the context of a controller rather than just patching up the symptoms (too many forks causing issues), because these are symptoms of a larger issue IMO. -- Aleksa Sarai (cyphar) www.cyphar.com -- 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/