From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759158AbbCDUX3 (ORCPT ); Wed, 4 Mar 2015 15:23:29 -0500 Received: from mail-pd0-f177.google.com ([209.85.192.177]:40880 "EHLO mail-pd0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752765AbbCDUX1 (ORCPT ); Wed, 4 Mar 2015 15:23:27 -0500 From: Aleksa Sarai To: tj@kernel.org, lizefan@huawei.com, mingo@redhat.com, peterz@infradead.org Cc: richard@nod.at, fweisbec@gmail.com, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, Aleksa Sarai Subject: [PATCH v3 0/2] cgroup: add pids subsystem Date: Thu, 5 Mar 2015 07:23:17 +1100 Message-Id: <1425500599-21676-1-git-send-email-cyphar@cyphar.com> X-Mailer: git-send-email 2.3.1 In-Reply-To: <1424660891-12719-1-git-send-email-cyphar@cyphar.com> References: <1424660891-12719-1-git-send-email-cyphar@cyphar.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is a further updated version of the nproc v2 patchset[1] from advice given by Tejun Heo[2]. The main changes include: * Switching from mm/page_counter (which is a memcg implementation feature) to a pid-controller-specific hierarchical charge/uncharge counter with limits implementation using atomic_long_t (which is also lockless as it is based on page_counter). * Updates to the user-space interface to allow for the setting of no limit to the number of pids in a cgroup (-1 == unlimited) as well as renaming of the files and the removal of nproc.max_limit. * The controller was renamed to `pids`. [1]: https://lkml.org/lkml/2015/2/26/787 [2]: https://lkml.org/lkml/2015/3/2/437 Aleksa Sarai (2): cgroups: allow a cgroup subsystem to reject a fork cgroups: add a pids subsystem include/linux/cgroup.h | 9 ++ include/linux/cgroup_subsys.h | 4 + init/Kconfig | 12 ++ kernel/Makefile | 1 + kernel/cgroup.c | 80 +++++++++--- kernel/cgroup_pids.c | 281 ++++++++++++++++++++++++++++++++++++++++++ kernel/fork.c | 12 +- 7 files changed, 381 insertions(+), 18 deletions(-) create mode 100644 kernel/cgroup_pids.c -- 2.3.1