LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Aleksa Sarai <cyphar@cyphar.com>
To: Tejun Heo <tj@kernel.org>
Cc: lizefan@huawei.com, mingo@redhat.com, peterz@infradead.org,
	richard@nod.at, "Frédéric Weisbecker" <fweisbec@gmail.com>,
	linux-kernel@vger.kernel.org, cgroups@vger.kernel.org
Subject: Re: [PATCH v8 3/4] cgroups: allow a cgroup subsystem to reject a fork
Date: Fri, 3 Apr 2015 10:42:27 +1100	[thread overview]
Message-ID: <CAOviyai9dvCTGK=VUm0uDSo7XbmKk1BFDrRzL15ppAWf8YjG3w@mail.gmail.com> (raw)
In-Reply-To: <20150401160258.GP9974@htj.duckdns.org>

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

  reply	other threads:[~2015-04-02 23:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-01  8:57 [PATCH v8 0/4] cgroups: add pids subsystem Aleksa Sarai
2015-04-01  8:57 ` [PATCH v8 1/4] cgroups: use bitmask to filter for_each_subsys Aleksa Sarai
2015-04-01  8:57 ` [PATCH v8 2/4] cgroups: replace explicit ss_mask checking with for_each_subsys_which Aleksa Sarai
2015-04-01  8:57 ` [PATCH v8 3/4] cgroups: allow a cgroup subsystem to reject a fork Aleksa Sarai
2015-04-01 16:02   ` Tejun Heo
2015-04-02 23:42     ` Aleksa Sarai [this message]
2015-04-06 15:05       ` Tejun Heo
2015-04-07 13:47         ` Aleksa Sarai
2015-04-07 14:00           ` Tejun Heo
2015-04-01  8:57 ` [PATCH v8 4/4] cgroups: implement the PIDs subsystem Aleksa Sarai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAOviyai9dvCTGK=VUm0uDSo7XbmKk1BFDrRzL15ppAWf8YjG3w@mail.gmail.com' \
    --to=cyphar@cyphar.com \
    --cc=cgroups@vger.kernel.org \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizefan@huawei.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=richard@nod.at \
    --cc=tj@kernel.org \
    --subject='Re: [PATCH v8 3/4] cgroups: allow a cgroup subsystem to reject a fork' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).