From: Tejun Heo <tj@kernel.org>
To: Aleksa Sarai <cyphar@cyphar.com>
Cc: lizefan@huawei.com, mingo@redhat.com, peterz@infradead.org,
richard@nod.at, fweisbec@gmail.com, linux-kernel@vger.kernel.org,
cgroups@vger.kernel.org
Subject: Re: [PATCH v14 4/4] cgroup: implement the PIDs subsystem
Date: Tue, 14 Jul 2015 17:31:48 -0400 [thread overview]
Message-ID: <20150714213148.GD2273@mtj.duckdns.org> (raw)
In-Reply-To: <20150610045304.GJ11955@mtj.duckdns.org>
On Wed, Jun 10, 2015 at 01:53:04PM +0900, Tejun Heo wrote:
> On Tue, Jun 09, 2015 at 09:32:10PM +1000, Aleksa Sarai wrote:
> > Adds a new single-purpose PIDs subsystem to limit the number of
> > tasks that can be forked inside a cgroup. Essentially this is an
> > implementation of RLIMIT_NPROC that applies to a cgroup rather than a
> > process tree.
> >
> > However, it should be noted that organisational operations (adding and
> > removing tasks from a PIDs hierarchy) will *not* be prevented. Rather,
> > the number of tasks in the hierarchy cannot exceed the limit through
> > forking. This is due to the fact that, in the unified hierarchy, attach
> > cannot fail (and it is not possible for a task to overcome its PIDs
> > cgroup policy limit by attaching to a child cgroup -- even if migrating
> > mid-fork it must be able to fork in the parent first).
> >
> > PIDs are fundamentally a global resource, and it is possible to reach
> > PID exhaustion inside a cgroup without hitting any reasonable kmemcg
> > policy. Once you've hit PID exhaustion, you're only in a marginally
> > better state than OOM. This subsystem allows PID exhaustion inside a
> > cgroup to be prevented.
>
> Patches 3-4 look good to me. Will apply once v4.3 dev window opens.
Applied 3-4 to cgroup/for-4.3.
Thanks.
--
tejun
prev parent reply other threads:[~2015-07-14 21:31 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-09 11:32 [PATCH v14 0/4] cgroup: add PIDs subsystem Aleksa Sarai
2015-06-09 11:32 ` [PATCH v14 1/4] cgroup: fix uninitialised iterator in for_each_subsys_which Aleksa Sarai
2015-06-10 4:49 ` Tejun Heo
2015-06-09 11:32 ` [PATCH v14 2/4] cgroup, block: implement task_get_css() Aleksa Sarai
2015-06-09 11:32 ` [PATCH v14 3/4] cgroup: allow a cgroup subsystem to reject a fork Aleksa Sarai
2015-06-09 11:32 ` [PATCH v14 4/4] cgroup: implement the PIDs subsystem Aleksa Sarai
2015-06-10 4:53 ` Tejun Heo
2015-06-10 15:01 ` Aleksa Sarai
2015-06-12 17:21 ` [PATCH] cgroup: add documentation for the PIDs controller Aleksa Sarai
2015-07-14 21:32 ` Tejun Heo
2015-07-14 21:31 ` Tejun Heo [this message]
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=20150714213148.GD2273@mtj.duckdns.org \
--to=tj@kernel.org \
--cc=cgroups@vger.kernel.org \
--cc=cyphar@cyphar.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan@huawei.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=richard@nod.at \
/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