From: Tejun Heo <tj@kernel.org>
To: John Stultz <john.stultz@linaro.org>
Cc: lkml <linux-kernel@vger.kernel.org>,
Li Zefan <lizefan@huawei.com>, Jonathan Corbet <corbet@lwn.net>,
cgroups@vger.kernel.org,
Android Kernel Team <kernel-team@android.com>,
Rom Lemarchand <romlem@android.com>,
Colin Cross <ccross@android.com>,
Johannes Weiner <hannes@cmpxchg.org>
Subject: Re: [RFC][PATCH 0/2] Android style loosening of cgroup attach permissions
Date: Fri, 5 Jun 2015 03:52:04 +0900 [thread overview]
Message-ID: <20150604185204.GQ20091@mtj.duckdns.org> (raw)
In-Reply-To: <CALAqxLWkXTgKzq68H6TvPc6Wgbn5_jwVoW5Q9onnHnvQ0bTNiA@mail.gmail.com>
Hello, John.
On Thu, Jun 04, 2015 at 10:11:17AM -0700, John Stultz wrote:
> And at least in the current android-3.18 kernel, I don't see any rcu
> sync modifications. But maybe I'm missing what you mean?
It was from years ago so maybe it's no longer needed anymore and
removed but there was a patch in the android kernel to remove
synchronize_rcu() somewhere to make things go faster, which was fine
for android's use case at the time but would lead to oops in other
cases. Hmmm... the upstream kernel dropped synchronize_rcu() quite a
while ago so maybe that's why it's no longer there.
> > Given that, I'm not sure this patchset makes sense for upstream.
>
> Right, I'm not suggesting the patch go in "as-is". I just wanted to
> show what Android is currently using, and start a discussion of what
> would be a better approach for Android to use, or what the kernel
> might need to be able to support Android's use case.
Sure, it'd be great if android's cgroup usage converges with other use
cases. The main problem I see is that for controllers with persistent
state (memcg), migration is either gonna be extremely expensive or
won't update existing charge state and this is a lot more of a
fundamental property rather than an incidental technical detail.
Each page requires tracking info and access to that tracking info must
be optimized for hot path memory operations - some of them get really
hot, so we can't pay much overhead there both in terms of locking and
indirection, which pretty much implies that updating the association
of each object is gonna be extremely expensive and likely fragile with
weird corner cases where things don't quite work as expected and so
on.
While currently this primarily matters only to memcg, I think it's
reasonable to assume that for any resource tracking regarding
persistent objects similar attributes are likely to be in play and as
such the general direction of cgroup development is towards mostly
static organizational structure with dynamic config update happening
through per-controller knobs.
Thanks.
--
tejun
prev parent reply other threads:[~2015-06-04 18:52 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-21 3:41 John Stultz
2015-05-21 3:41 ` [RFC][PATCH 1/2] cgroup: Add generic cgroup subsystem permission checks John Stultz
2015-05-21 3:41 ` [RFC][PATCH 2/2] cgroup: Add a memcg and cpu cg allow_attach policy for Android John Stultz
2015-06-02 19:07 ` [RFC][PATCH 0/2] Android style loosening of cgroup attach permissions John Stultz
2015-06-03 5:50 ` Tejun Heo
2015-06-04 17:11 ` John Stultz
2015-06-04 18:36 ` Johannes Weiner
2015-06-05 21:28 ` John Stultz
2015-06-05 21:33 ` John Stultz
2015-06-04 18:52 ` Tejun Heo [this message]
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=20150604185204.GQ20091@mtj.duckdns.org \
--to=tj@kernel.org \
--cc=ccross@android.com \
--cc=cgroups@vger.kernel.org \
--cc=corbet@lwn.net \
--cc=hannes@cmpxchg.org \
--cc=john.stultz@linaro.org \
--cc=kernel-team@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan@huawei.com \
--cc=romlem@android.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®