Re: [PATCH v9 3/4] cgroups: allow a cgroup subsystem to reject a fork

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>> >> Do you also want me to completely drop the COUNT macro? IMO it makes
>> >> the CGROUP_<TAG>_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 cgroups" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [Monitors]

  Powered by Linux