Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753886AbbB0ERf (ORCPT ); Thu, 26 Feb 2015 23:17:35 -0500 Received: from mail-pa0-f48.google.com ([209.85.220.48]:42764 "EHLO mail-pa0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753279AbbB0ERd (ORCPT ); Thu, 26 Feb 2015 23:17:33 -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: [RFC PATCH v2 0/2] add nproc cgroup subsystem Date: Fri, 27 Feb 2015 15:17:17 +1100 Message-Id: <1425010639-16492-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 Content-Length: 1268 Lines: 32 This is an updated version of the nproc patchset[1], in which the forking cleanup issue has been resolved by adding can_fork and cancel_fork callbacks to cgroup subsystems. The can_fork callback is run early enough that it doesn't get called after the "point of no return" where the process is exposed (which is when fork) is called, and cancel_fork is run during the cleanup of copy_process if the fork fails due to other reasons. [1]: https://lkml.org/lkml/2015/2/22/204 Aleksa Sarai (2): cgroups: allow a cgroup subsystem to reject a fork cgroups: add an nproc subsystem include/linux/cgroup.h | 9 ++ include/linux/cgroup_subsys.h | 4 + init/Kconfig | 10 +++ kernel/Makefile | 1 + kernel/cgroup.c | 80 +++++++++++++---- kernel/cgroup_nproc.c | 198 ++++++++++++++++++++++++++++++++++++++++++ kernel/fork.c | 12 ++- 7 files changed, 296 insertions(+), 18 deletions(-) create mode 100644 kernel/cgroup_nproc.c -- 2.3.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/