]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
cgroup: Add pids controller event when fork fails because of pid limit
authorKenny Yu <kennyyu@fb.com>
Tue, 21 Jun 2016 18:04:36 +0000 (14:04 -0400)
committerTejun Heo <tj@kernel.org>
Tue, 21 Jun 2016 18:04:36 +0000 (14:04 -0400)
commit135b8b37bd91cc82f83e98fca109b80375f5317e
tree2e0b93d5f45b34db6b7f4f70ba5ff7d01ef1c154
parente7e15b87f86d4a48c270b81cf027eafd801e5b89
cgroup: Add pids controller event when fork fails because of pid limit

This patch adds more visibility into the pids controller when the controller
rejects a fork request. Whenever fork fails because the limit on the number of
pids in the cgroup is reached, the controller will log this and also notify the
newly added cgroups events file. The `max` key in the events file represents
the number of times fork failed because of the pids controller.

This change also logs only the first time the `max` event counter is
incremented. This is to provide a hint to the user to understand why fork
failed, as users are not yet used to seeing fork failures because of the
pids controller.

Signed-off-by: Kenny Yu <kennyyu@fb.com>
Acked-by: Johannes Weiner <hannes <at> cmpxchg.org>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/cgroup_pids.c