Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp976659imm; Fri, 15 Jun 2018 09:10:26 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLt73jbuX9HdOpbLkQHTerJw2KdAUwDUWkvSH8yHHC/zL5Rz6mdQgCx0h+jjb4WvdGKTClu X-Received: by 2002:a62:67c5:: with SMTP id t66-v6mr2673413pfj.20.1529079025919; Fri, 15 Jun 2018 09:10:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529079025; cv=none; d=google.com; s=arc-20160816; b=htX5PWd75rYQ4R/6ZhYK5pPN3pIY/oruTV32WnGnWkD48yQ+YIK9PTVKVmFy3o17hz DIhgMiuVmETssqQT+RqSHw3NeEjmmifH0SmvyBnAfqf4D1Qy6z6yGCcgPhK1p0pID5fq yWckosFiSQr0LwF1AXurlmPCgJBBYh2MyACWlVlmek7Lc0Q0szYXWy8X4O/LNxXhhitI lJChic533bVA0aiyFoNczqJMS/IEU8yAVSVf+ncfzpzoRpmMxZzZFNqPcbFz1KFXT4ck BFowBHu7eXQPfwz9iZVzbvAsTCWTWj/r1qYQNp2fFYhkq9f2Td1E2JAiPuAMcwDWMnWe UvuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=JCwpqatCeJKyiSKt7/8OehlEuppgSvezsu8/goCkFLU=; b=YxmWdtcg7Qx20ygatzd+sWeClPI2QOTOL3EDtdWDU1Z4NSITjcB1HybHK4o/yJg72W MMONwcO5c1D8Me+ulO/a+PZfntSD2jDu21cGEAN4gXfWTR1xOGt/J/HwC5fSb3vUHoFs jZkzPu/mbAJgauk8ucnQRzXGJIFAX63AGw+6pE9Yozb2JluYpyWLHGdpn3RUg1+z8DNz rQ65h5sYXZLiJBh+fbSVe75oWp8qS/D32a6QoaotOK+4sHavfuX/k71pCqKgRICZFlPO LJ7++oD0xZPN3JeGOkS/+pnnibFX4JkTlJeMKH63F99qAGgPF2x6vIqNTiZdy7uKYnMZ MiLg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u10-v6si6535148pgc.261.2018.06.15.09.09.47; Fri, 15 Jun 2018 09:10:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966008AbeFOQHc (ORCPT + 99 others); Fri, 15 Jun 2018 12:07:32 -0400 Received: from us.icdsoft.com ([192.252.146.184]:43668 "EHLO us.icdsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965947AbeFOQHa (ORCPT ); Fri, 15 Jun 2018 12:07:30 -0400 Received: (qmail 5552 invoked by uid 1001); 15 Jun 2018 16:07:30 -0000 Received: from unknown (HELO ?94.155.37.249?) (famzah@94.155.37.249) by 192.252.159.165 with ESMTPA; 15 Jun 2018 16:07:30 -0000 Subject: Re: Cgroups "pids" controller does not update "pids.current" count immediately To: Tejun Heo Cc: cgroups@vger.kernel.org, linux-kernel@vger.kernel.org References: <77af3805-e912-2664-f347-e30c0919d0c4@icdsoft.com> <20180614150650.GU1351649@devbig577.frc2.facebook.com> <7860105c-553a-534b-57fc-222d931cb972@icdsoft.com> <20180615154140.GV1351649@devbig577.frc2.facebook.com> From: Ivan Zahariev Message-ID: <1d635d1d-6152-ecfc-d235-147ff1fe7c95@icdsoft.com> Date: Fri, 15 Jun 2018 19:07:27 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180615154140.GV1351649@devbig577.frc2.facebook.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-bg Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Thank you for the quick and insightful reply. I have one suggestion below: On 15.6.2018 г. 18:41 ч., Tejun Heo wrote: > On Fri, Jun 15, 2018 at 05:26:04PM +0300, Ivan Zahariev wrote: >> The standard RLIMIT_NPROC does not suffer from such accounting >> discrepancies at any time. > They seem equivalent but serve a bit different purposes. RLIMIT_NPROC > is primarily about limiting what the user can do and doesn't guarantee > that that actually matches resource (pid here) consumption. > >> Is it really technically not possible to make "pids.current" do >> accounting properly like RLIMIT_NPROC does? We were hoping to >> replace RLIMIT_NPROC with the "pids" controller. > It is of course possible but at a cost. The cost (getting rid of lazy > release optimizations) is just not justifiable for most cases. I understand all concerns and design decisions. However, having RLIMIT_NPROC support combined with "cgroups" hierarchy would be very handy. Does it make sense that you introduce "nproc.current" and "nproc.max" metrics which work in the same atomic, real-time way like RLIMIT_NPROC? Or make this in a new "nproc" controller? -- Ivan --