Linux cgroups development
 help / color / mirror / Atom feed
From: Ivan Zahariev <famzah@icdsoft.com>
To: Tejun Heo <tj@kernel.org>
Cc: cgroups@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: Cgroups "pids" controller does not update "pids.current" count immediately
Date: Fri, 15 Jun 2018 17:26:04 +0300	[thread overview]
Message-ID: <7860105c-553a-534b-57fc-222d931cb972@icdsoft.com> (raw)
In-Reply-To: <20180614150650.GU1351649@devbig577.frc2.facebook.com>

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

  parent reply	other threads:[~2018-06-15 14:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <77af3805-e912-2664-f347-e30c0919d0c4@icdsoft.com>
2018-06-14 17:26 ` Cgroups "pids" controller does not update "pids.current" count immediately Aleksa Sarai
2018-06-14 17:27   ` Aleksa Sarai
     [not found] ` <20180614150650.GU1351649@devbig577.frc2.facebook.com>
2018-06-15 14:26   ` Ivan Zahariev [this message]
2018-06-15 15:41     ` Tejun Heo
2018-06-15 16:07       ` Ivan Zahariev
2018-06-15 16:16         ` Tejun Heo
2018-06-15 17:40           ` Ivan Zahariev
2018-06-15 19:07             ` Tejun Heo
2018-06-15 19:38               ` Ivan Zahariev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7860105c-553a-534b-57fc-222d931cb972@icdsoft.com \
    --to=famzah@icdsoft.com \
    --cc=cgroups@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox