Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2213716imm; Thu, 14 Jun 2018 10:28:52 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJ0voZJCslTykqgEbI2scCbPkc9C3WTJ87hAGuibJdwsFG2tyMt4q37fBfiMQf5PxkxneoY X-Received: by 2002:a62:1c43:: with SMTP id c64-v6mr10328038pfc.176.1528997332008; Thu, 14 Jun 2018 10:28:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528997331; cv=none; d=google.com; s=arc-20160816; b=chr3DRZQ+zDlB5+YMw5bKZoivXyzlQNg7NsTMA+3ivajA9ygjZzvM3Z0iaeaug3i+L n1ES8S83bcb6pXf7Lu3H4++WifU1BzZ8qRCxtn57+wxEqpN4tbfkHPvDQkDzFndoZDXi gcJs6bQ00trrjbzC2+5jHXHwpdey6LeXF8PtO1thzjIszAKW6m7ilT7WKC3ZpDZkwUdF YeV30+rCuTmc9I1YqHGwYgkmg444AXuctY2RqrKs/uZ7Op6Dgs38OhHkOjD4nIdhuDK7 d1ifmhgWfJ41OhejIJd103ADqvdEkvTl/wPlPozCMKIX5LfWwfV9MhNIdmTWMhO59zYi i79Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=0xMGTXvDoXbDJMYRhcE6nr1tIygnZGBQjmIJPgIrh4o=; b=Vx3FXTWsPefPkA1/U82a/ctGu6AL6vMyUiJK0UBtH44Y1PMq/qHxVQQ/iqDl7mzsBY sATZk56XerU/uOo5UiUlv77gBgJeMC1IA2Sc/2DCx0ry8YCFcG2pdNNjvhp5AWiJAhG+ 4XkTHHgywnuWCBqFmNk3bycE7ohzOJ0tkUcZp/3zuS0cm1syW15Hab5FeUiionZ9Jv+n tmbSt7Op3Wygt/uPZ7/3CGtZ77JArHNRJusxOPaRLhVBkLqP1S7kLqg5BsV8rerGU0ir 83X2GNjfGcRtfrM5oqmf9rzvpOjXQvH+FFMtuV0o8QcvmVb2/AUYa5vaXGe5B5wHPoOZ O9YA== 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 a6-v6si5958694pfh.137.2018.06.14.10.28.37; Thu, 14 Jun 2018 10:28:51 -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 S1755323AbeFNR0m (ORCPT + 99 others); Thu, 14 Jun 2018 13:26:42 -0400 Received: from mx2.suse.de ([195.135.220.15]:48598 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754526AbeFNR0l (ORCPT ); Thu, 14 Jun 2018 13:26:41 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext-too.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id C8031AE89; Thu, 14 Jun 2018 17:26:39 +0000 (UTC) Date: Fri, 15 Jun 2018 03:26:34 +1000 From: Aleksa Sarai To: Ivan Zahariev Cc: cgroups@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: Cgroups "pids" controller does not update "pids.current" count immediately Message-ID: <20180614172634.ymoik5uov3vzftmp@gordon> References: <77af3805-e912-2664-f347-e30c0919d0c4@icdsoft.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="n2z34pfmzym6bcpm" Content-Disposition: inline In-Reply-To: <77af3805-e912-2664-f347-e30c0919d0c4@icdsoft.com> User-Agent: NeoMutt/20170912 (1.9.0) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --n2z34pfmzym6bcpm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2018-06-14, 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=3D199713 I believe that very few people watch the kernel bugzilla -- it's almost always better to send a mail to LKML (speaking of which, you should always include in Cc). > I've tested this on 4.14.27 and 4.4.0-124-generic Ubuntu. >=20 > If I start a couple of processes which exit very quickly (like a simple B= ash > script with many commands in it), the reported value in "pids.current" is > not updated immediately when processes exit. This leads to too many > processes incorrectly accounted in "pids.current" which hits the "pids.ma= x" > prematurely. One possible reason for this might be related to zombie processes. cgroup.procs doesn't include any zombie processes (tasks are removed when they exit(2)), but the pids controller does track zombies (tasks are removed when the 'struct task' is put'd). This could explain why there's a discrepancy which clears itself up after a short period of time -- though I am not sure that your reproducer will actually produce zombies (I only took a quick look at it). > The "memory" controller, for example, works as expected and does not suff= er > from this asynchronous lag. I'm not sure what makes the memory controller and the pids controller comparable in this aspect -- there is no "pids.current" for the memory controller. --=20 Aleksa Sarai Senior Software Engineer (Containers) SUSE Linux GmbH --n2z34pfmzym6bcpm Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEXzbGxhtUYBJKdfWmnhiqJn3bjbQFAlsipUYACgkQnhiqJn3b jbQOrhAAgG6rzxPTPP0i7Y2oMqlWigk48dx8cXdvRRa2jRYMZGURPi5F0zFm+9lT man19bmp5vFWAHsjfVh6ufh6A76jUEkgRdnb8EGy/U0ABf5dgkQylXshPUFNmNW2 sxvadMadWBlR/BIGFO48h0CDJd59DoWegnkwdTMN9oOCdCc+g2N18IssCUT7DHL3 fYcyB4Qbgygg12ZDze/znp8DoMnuDKGbZLZHeQctn7lbAkpCvvKxJo/V1hvewgtf dr7C4YghzsUt2LWkgNSPwX/WuU23b3nvz51w9yaEhCrOWkPKp353CHHnck5JsDFC asAryTvko05AKDrXv3KvlPMB6poye8o0gZkIlXKsmdoYwrjNhjccIHEaUrcdawgD II5NKZmkNFcvce2pjXVd090SaeZX2rxigu0f21Ez9+liWmBwaQKJWCmFMUURS7Gy 3HHFwRNtEpYxT3PNqONYdq1tmqnnlZekDBHr+DBvDLAVHwhG4fIlnTZmQYfjb8l+ RdAqFMQzde7/3xn5MkKWloUI2D/Bd24OYUH3Q2QcgwxKq4XmGr/EE3Qd6nX2Zome iF4FBJ20V9XhBWFCpei6Cx1NYx2NZjdpg/W7BGLtgnpNtViMxgmSy25427Z3onrw +84zAFh3lWCcNqUtc3Ptek4tprqkPJnFqk235pLXZ2ekFLO62Zs= =CcXs -----END PGP SIGNATURE----- --n2z34pfmzym6bcpm--