[lkml]   [2015]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v8 3/4] cgroups: allow a cgroup subsystem to reject a fork
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)

 \ /
  Last update: 2015-04-03 02:21    [W:0.096 / U:1.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site