From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tejun Heo Subject: [PATCHSET cgroup/for-3.8] cgroup: allow ->post_create() to fail Date: Mon, 12 Nov 2012 19:01:27 -0800 Message-ID: <1352775704-9023-1-git-send-email-tj@kernel.org> Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer; bh=SQHI2XtYpIj3LUkK9ZPHXAFvFb10XxL+IXKa4f0T3i4=; b=n1/lsr60EoOziA54oZ1F4tWCGrrnaSjVFwGwlcf7D+oLmGgT8pkpwCqTUFTiGkZb3g Agg5rTciZPhKg0mHODAYhXYjuM4JUmwF0KrfdcCKABi9QMDNdddo7kfOzWMCbmfoB3SN BqbR0JUZ4WHwLrC9S0MTlWQoDGhyAJhvUmPIsJeI09edhRYMXfF4tSMB/BBbps62Pd6L M8Dr+SPe9dZg38l43ak5gqDKmjAaDItrWReoFJZwlyKnobXoVZ00GvCKHrOCkgDOFLeT 2w4mNMNo6WnbMv+WM3lss0cop5xtKVKBEKu7yzRwVArDKdtVTkbA9Ybks3vjYDFW1GGE lP3w== Sender: cgroups-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org, containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: mhocko-AlSwsSmVLrQ@public.gmane.org, glommer-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org Hello, This became a rather large patchset mostly because there are a lot of weirdities and subtle breakages in create/destroy/load/unload paths. The goal of the patchset is allowing ->post_create() to fail and renaming ->create/post_create/pre_destroy/destroy() to ->css_alloc/css_online/css_offline/css_free(). This patchset contains the following seventeen patches. 0001-cgroup-remove-incorrect-dget-dput-pair-in-cgroup_cre.patch 0002-cgroup-initialize-cgrp-allcg_node-in-init_cgroup_hou.patch 0003-cgroup-open-code-cgroup_create_dir.patch 0004-cgroup-create-directory-before-linking-while-creatin.patch 0005-cgroup-cgroup-dentry-isn-t-a-RCU-pointer.patch 0006-cgroup-remove-duplicate-RCU-free-on-struct-cgroup.patch 0007-cgroup-make-CSS_-flags-bit-masks-instead-of-bit-posi.patch 0008-cgroup-trivial-cleanup-for-cgroup_init-load_subsys.patch 0009-cgroup-lock-cgroup_mutex-in-cgroup_init_subsys.patch 0010-cgroup-fix-harmless-bugs-in-cgroup_load_subsys-fail-.patch 0011-cgroup-separate-out-cgroup_destroy_locked.patch 0012-cgroup-introduce-CSS_ONLINE-flag-and-on-offline_css-.patch 0013-cgroup-simplify-cgroup_load_subsys-failure-path.patch 0014-cgroup-use-mutex_trylock-when-grabbing-i_mutex-of-a-.patch 0015-cgroup-update-cgroup_create-failure-path.patch 0016-cgroup-allow-post_create-to-fail.patch 0017-cgroup-rename-create-post_create-pre_destroy-destroy.patch 0001 is a bugfix. Tagged for -stable. I don't I'll push it through for-3.7-fixes tho. This has been broken forever and nobody reported anything yet. 0002-0011 are various fixes and cleanups to prepare for the following changes. Each should be self-explanatory. 0012-0015 are preparation patches more directly related to allowing failure of ->post_create(). 0016 allows ->post_create() to fail. 0017 renames ops and updates documentation. This patchst is on top of cgroup/for-3.8 and available on the following git branch. git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git review-cgroup-online-may-fail and contains the following changes. Documentation/cgroups/cgroups.txt | 49 +++--- block/blk-cgroup.c | 14 - include/linux/cgroup.h | 47 +++--- kernel/cgroup.c | 288 +++++++++++++++++++++----------------- kernel/cgroup_freezer.c | 22 +- kernel/cpuset.c | 10 - kernel/events/core.c | 8 - kernel/sched/core.c | 16 +- mm/hugetlb_cgroup.c | 14 - mm/memcontrol.c | 12 - net/core/netprio_cgroup.c | 8 - net/sched/cls_cgroup.c | 8 - security/device_cgroup.c | 8 - 13 files changed, 278 insertions(+), 226 deletions(-) Thanks. -- tejun From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753326Ab2KMDBy (ORCPT ); Mon, 12 Nov 2012 22:01:54 -0500 Received: from mail-pb0-f46.google.com ([209.85.160.46]:46691 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751552Ab2KMDBw (ORCPT ); Mon, 12 Nov 2012 22:01:52 -0500 From: Tejun Heo To: lizefan@huawei.com, containers@lists.linux-foundation.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org Cc: mhocko@suse.cz, glommer@parallels.com Subject: [PATCHSET cgroup/for-3.8] cgroup: allow ->post_create() to fail Date: Mon, 12 Nov 2012 19:01:27 -0800 Message-Id: <1352775704-9023-1-git-send-email-tj@kernel.org> X-Mailer: git-send-email 1.7.11.7 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, This became a rather large patchset mostly because there are a lot of weirdities and subtle breakages in create/destroy/load/unload paths. The goal of the patchset is allowing ->post_create() to fail and renaming ->create/post_create/pre_destroy/destroy() to ->css_alloc/css_online/css_offline/css_free(). This patchset contains the following seventeen patches. 0001-cgroup-remove-incorrect-dget-dput-pair-in-cgroup_cre.patch 0002-cgroup-initialize-cgrp-allcg_node-in-init_cgroup_hou.patch 0003-cgroup-open-code-cgroup_create_dir.patch 0004-cgroup-create-directory-before-linking-while-creatin.patch 0005-cgroup-cgroup-dentry-isn-t-a-RCU-pointer.patch 0006-cgroup-remove-duplicate-RCU-free-on-struct-cgroup.patch 0007-cgroup-make-CSS_-flags-bit-masks-instead-of-bit-posi.patch 0008-cgroup-trivial-cleanup-for-cgroup_init-load_subsys.patch 0009-cgroup-lock-cgroup_mutex-in-cgroup_init_subsys.patch 0010-cgroup-fix-harmless-bugs-in-cgroup_load_subsys-fail-.patch 0011-cgroup-separate-out-cgroup_destroy_locked.patch 0012-cgroup-introduce-CSS_ONLINE-flag-and-on-offline_css-.patch 0013-cgroup-simplify-cgroup_load_subsys-failure-path.patch 0014-cgroup-use-mutex_trylock-when-grabbing-i_mutex-of-a-.patch 0015-cgroup-update-cgroup_create-failure-path.patch 0016-cgroup-allow-post_create-to-fail.patch 0017-cgroup-rename-create-post_create-pre_destroy-destroy.patch 0001 is a bugfix. Tagged for -stable. I don't I'll push it through for-3.7-fixes tho. This has been broken forever and nobody reported anything yet. 0002-0011 are various fixes and cleanups to prepare for the following changes. Each should be self-explanatory. 0012-0015 are preparation patches more directly related to allowing failure of ->post_create(). 0016 allows ->post_create() to fail. 0017 renames ops and updates documentation. This patchst is on top of cgroup/for-3.8 and available on the following git branch. git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git review-cgroup-online-may-fail and contains the following changes. Documentation/cgroups/cgroups.txt | 49 +++--- block/blk-cgroup.c | 14 - include/linux/cgroup.h | 47 +++--- kernel/cgroup.c | 288 +++++++++++++++++++++----------------- kernel/cgroup_freezer.c | 22 +- kernel/cpuset.c | 10 - kernel/events/core.c | 8 - kernel/sched/core.c | 16 +- mm/hugetlb_cgroup.c | 14 - mm/memcontrol.c | 12 - net/core/netprio_cgroup.c | 8 - net/sched/cls_cgroup.c | 8 - security/device_cgroup.c | 8 - 13 files changed, 278 insertions(+), 226 deletions(-) Thanks. -- tejun