Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752793AbbDQUs6 (ORCPT ); Fri, 17 Apr 2015 16:48:58 -0400 Received: from mail-ig0-f178.google.com ([209.85.213.178]:37697 "EHLO mail-ig0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751354AbbDQUsz (ORCPT ); Fri, 17 Apr 2015 16:48:55 -0400 MIME-Version: 1.0 X-Originating-IP: [122.106.150.15] In-Reply-To: <20150417204206.GI16743@htj.duckdns.org> References: <1428799917-15141-1-git-send-email-cyphar@cyphar.com> <1428799917-15141-4-git-send-email-cyphar@cyphar.com> <20150413142439.GA2596@htj.duckdns.org> <20150414121732.GL2596@htj.duckdns.org> <20150417144519.GC1954@htj.duckdns.org> <20150417204206.GI16743@htj.duckdns.org> Date: Sat, 18 Apr 2015 06:48:55 +1000 Message-ID: Subject: Re: [PATCH v9 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: 1267 Lines: 36 >> >> Do you also want me to completely drop the COUNT macro? IMO it makes >> >> the CGROUP__COUNT consolidation much nicer. >> > >> > What's wrong with simply having start and end tags? >> >> Because you'd have to write (CGROUP_TAG_END - CGROUP_TAG_START) every >> time? It's a small addition and it makes referencing the range of a >> tagged section much easier. > > Wouldn't loops look more like > > for (subsys = CGROUP_TAG_START; subsys < CGROUP_TAG_END; subsys++) Sorry, I meant for defining arrays. `state[CGROUP_TAG_END - CGROUP_TAG_START]` is just more annoying to type and read than `state[CGROUP_TAG_COUNT]`. > And even if not, just define a separate macro for the length. It's > not like we're gonna have a lot of tags. Do you mean like this? #define SUBSYS_TAG_COUNT(_tag) (CGROUP_ ## _tag ## _END - CGROUP_ ## _tag ## _START) That's fine I guess, I just wanted to match CGROUP_SUBSYS_COUNT in semantics, but I'll do that if you prefer it that way. -- 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/