[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120628182934.GD22641@google.com>
Date: Thu, 28 Jun 2012 11:29:34 -0700
From: Tejun Heo <tj@...nel.org>
To: Michal Hocko <mhocko@...e.cz>
Cc: David Rientjes <rientjes@...gle.com>,
Zhouping Liu <zliu@...hat.com>, linux-mm@...ck.org,
Li Zefan <lizefan@...wei.com>, CAI Qian <caiqian@...hat.com>,
LKML <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
aneesh.kumar@...ux.vnet.ibm.com
Subject: Re: memcg: cat: memory.memsw.* : Operation not supported
Hello, Michal.
On Thu, Jun 28, 2012 at 02:36:11PM +0200, Michal Hocko wrote:
> @@ -2726,6 +2726,9 @@ static int cgroup_addrm_files(struct cgroup *cgrp, struct cgroup_subsys *subsys,
> int err, ret = 0;
>
> for (cft = cfts; cft->name[0] != '\0'; cft++) {
> + if (subsys->cftype_enabled && !subsys->cftype_enabled(cft->name))
> + continue;
> +
> if (is_add)
> err = cgroup_add_file(cgrp, subsys, cft);
> else
I hope we could avoid this dynamic decision. That was one of the main
reasons behind doing the cftype thing. It's better to be able to
"declare" these kind of things rather than being able to implement
fully flexible dynamic logic. Too much flexibility often doesn't
achieve much while being a hindrance to evolution of code base (trying
to improve / simplify X - ooh... there's this single wacko corner case
YYY here which is really different from all other users).
really_do_swap_account can't change once booted, right? Why not just
separate out memsw cfts into a separate array and call
cgroup_add_cftypes() from init path? Can't we do that from
enable_swap_cgroup()?
Thanks.
--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists