Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp870609imm; Fri, 15 Jun 2018 07:33:35 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIU93N/OCTr4oXWvpZOErY6P7njx6RwOXFD8FWZ0mobG/0zIIS+PZJzo3Gkb430G3On81vJ X-Received: by 2002:aa7:8589:: with SMTP id w9-v6mr2242956pfn.119.1529073215457; Fri, 15 Jun 2018 07:33:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529073215; cv=none; d=google.com; s=arc-20160816; b=m932OmvR7PSL8PtgyAYnP2zpyND4WyGcZFyF44UfRz3VEUDf5706LOHXZLMu6xFbTs DMSBx9nZigNRt49pBJ7OnkMXqvkQ8WCYphYEA/v9UJL+IetWXNz8FfHh+sqiLW56rAyi zYPdCp4U0rlB8FoJBPrZS3kDuYloPaLL2a7kRzac6bcYBA5DpTdtvD5N8oZmP8V+nwXt H9lZuEKaD6BFmb1Kr8NvFJ68uuObf2xVkQpgvRmSu5o49CVRJ9F2/ttNq8NQm62qghRV vzoSloBTAJro5SII8f12sne+/OWJhulPNAyfISQ7zI727ZNo6BWprb/MFnrYSDZX0ha3 xmxw== 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=k/rsu8BRQgQ3CqOlxu7MJcUy+hEv6gbtXoCupokaqRw=; b=nD+2eGp7EWUmKWGFIABg6FHEM3TaAeXalohMp6hJglNXq53lf4mLhIwnM8ioGISPKf uXBwY7tEAW3UkgFRRliWiY5C+6ebiuUpcFKypax63H0dQj1wttHYi0riCXHr1Q9kPV3m 3wweJ6b+2J3E5oINNgoZMQoE0IFbJkiXjMdhPc2pX+58w87B0D7cmk/1ttefLTLY7JAE Fj+XQUkHKkHf2grIus3Zb2KEoYozs5m10UMHEEJZyINwsynYmmcSd7vmdpyIcJIfBJtq BEXBb1F3XoD7V+BdYsO5tfdWPGquHqjpI4+R11cYVaOEilGW+EoIsjJNEcyLnOSD26IQ saGw== 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 f77-v6si8294956pff.267.2018.06.15.07.33.19; Fri, 15 Jun 2018 07:33:35 -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 S1756225AbeFOOcu (ORCPT + 99 others); Fri, 15 Jun 2018 10:32:50 -0400 Received: from us.icdsoft.com ([192.252.146.184]:44820 "EHLO us.icdsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755816AbeFOOct (ORCPT ); Fri, 15 Jun 2018 10:32:49 -0400 X-Greylist: delayed 400 seconds by postgrey-1.27 at vger.kernel.org; Fri, 15 Jun 2018 10:32:48 EDT Received: (qmail 29044 invoked by uid 1001); 15 Jun 2018 14:26:07 -0000 Received: from unknown (HELO ?94.155.37.249?) (famzah@94.155.37.249) by 192.252.159.165 with ESMTPA; 15 Jun 2018 14:26:07 -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> From: Ivan Zahariev Message-ID: <7860105c-553a-534b-57fc-222d931cb972@icdsoft.com> Date: Fri, 15 Jun 2018 17:26:04 +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: <20180614150650.GU1351649@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 On 14.6.2018 г. 18:06 ч., Tejun Heo wrote: > On Thu, Jun 14, 2018 at 02:56:00PM +0300, Ivan Zahariev wrote: >> I posted a kernel bug about this a month ago but it did not receive >> any attention: https://bugzilla.kernel.org/show_bug.cgi?id=199713 >> >> Here is a copy of the bug report and I hope that this is the correct >> place to discuss this: > Well, for now at least, that's the expected behavior. It's not > supposed to be able to account all changes immediately (the kernel > doesn't free a lot of things immediately for performance and other > reasons). The intended use is setting up a reasonable upperbound with > some buffer space. If that's by design, it's a bit disappointing and at least the docs should mention it. The standard RLIMIT_NPROC does not suffer from such accounting discrepancies at any time. The "memory" cgroups controller also does not suffer from any discrepancies -- it accounts memory usage in real time without any lag on process start or exit. The "tasks" file list is also always up-to-date. 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. --Ivan