From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751253AbbCNEh1 (ORCPT ); Sat, 14 Mar 2015 00:37:27 -0400 Received: from mail-pa0-f53.google.com ([209.85.220.53]:34450 "EHLO mail-pa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750788AbbCNEhY (ORCPT ); Sat, 14 Mar 2015 00:37:24 -0400 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 v6 0/3] cgroups: add pids subsystem Date: Sat, 14 Mar 2015 15:37:12 +1100 Message-Id: <1426307835-5893-1-git-send-email-cyphar@cyphar.com> X-Mailer: git-send-email 2.3.2 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is a revised version of the pids v5 patchset, modified to deal with several stylistic and correctness issues put forward by Tejun Heo. The main changes include: * Add bitmask filtering of for_each_subsys() in the form of for_each_subsys_which(). * Revert all succeeded can_fork() callbacks if any one of them fails inside cgroup_can_fork(). * Move revert/reapply code to a reapply_fork() callback provided by each cgroup controller. It is only run if the association for the specific subsystem changed during the interlude between cgroup_can_fork() and cgroup_post_fork(). * Pass an opaque pointer between cgroup_*_fork(), which holds the "current" task css_set. The css_set is pinned by bumping the refcount in cgroup_can_fork() and later unpinned in cgroup_{cancel,post}_fork(). * A whole bunch of userland API and stylistic fixes. Aleksa Sarai (3): cgroups: use bitmask to filter for_each_subsys cgroups: allow a cgroup subsystem to reject a fork cgroups: add a pids subsystem include/linux/cgroup.h | 13 +- include/linux/cgroup_subsys.h | 4 + init/Kconfig | 11 ++ kernel/Makefile | 1 + kernel/cgroup.c | 132 +++++++++++++++--- kernel/cgroup_pids.c | 301 ++++++++++++++++++++++++++++++++++++++++++ kernel/fork.c | 18 ++- 7 files changed, 459 insertions(+), 21 deletions(-) create mode 100644 kernel/cgroup_pids.c -- 2.3.2