Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752689AbbDBXmb (ORCPT ); Thu, 2 Apr 2015 19:42:31 -0400 Received: from mail-ie0-f171.google.com ([209.85.223.171]:34025 "EHLO mail-ie0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751469AbbDBXm2 (ORCPT ); Thu, 2 Apr 2015 19:42:28 -0400 MIME-Version: 1.0 X-Originating-IP: [122.106.150.15] In-Reply-To: <20150401160258.GP9974@htj.duckdns.org> References: <1427878641-5273-1-git-send-email-cyphar@cyphar.com> <1427878641-5273-4-git-send-email-cyphar@cyphar.com> <20150401160258.GP9974@htj.duckdns.org> Date: Fri, 3 Apr 2015 10:42:27 +1100 Message-ID: Subject: Re: [PATCH v8 3/4] cgroups: allow a cgroup subsystem to reject a fork From: Aleksa Sarai To: Tejun Heo Cc: lizefan@huawei.com, mingo@redhat.com, peterz@infradead.org, richard@nod.at, =?UTF-8?B?RnLDqWTDqXJpYyBXZWlzYmVja2Vy?= , linux-kernel@vger.kernel.org, cgroups@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1094 Lines: 26 Hello, Tejun. >> +struct cgroup_fork_state { >> + void *ss_state[CGROUP_SUBSYS_COUNT]; >> +}; > > Can we collect the subsystems which require pre/post fork callbacks to > the front in group_subsys.h and do do CGROUP_SUBSYS_FORK_COUNT (or > whatever) instead? Then, we don't need all these subsys bitmasks > either we can just test the index against that and be done with it. I tried doing this and the kernel would refuse to boot. I believe it has something to do with the ordering of early_init subsystems, but I'm not entirely sure (this optimisation can be dealt with later [it's non-critical], so IMO this should be done in a separate patchset [if at all]). Also, your later comments would fix the subsys bitmask problem (we can just pass the default %NULL), we don't even need to test the index. -- Aleksa Sarai (cyphar) www.cyphar.com -- 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/