[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150720114913.GG1211@dhcp22.suse.cz>
Date: Mon, 20 Jul 2015 13:49:13 +0200
From: Michal Hocko <mhocko@...nel.org>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Tejun Heo <tj@...nel.org>, Johannes Weiner <hannes@...xchg.org>,
Vladimir Davydov <vdavydov@...allels.com>, linux-mm@...ck.org,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/5] memcg: export struct mem_cgroup
On Fri 17-07-15 13:19:00, Andrew Morton wrote:
> On Fri, 17 Jul 2015 11:18:27 -0400 Tejun Heo <tj@...nel.org> wrote:
>
> > Maybe there are details to be improved but I think
> > it's about time mem_cgroup definition gets published.
>
> grumble.
I am open to other cleanups but keeping mem_cgroup private sounds like
we will face more issues long term.
> enum mem_cgroup_events_target can remain private to memcontrol.c. It's
> only used by mem_cgroup_event_ratelimit() and that function is static.
Except it is needed by mem_cgroup_stat_cpu. More below...
> Why were cg_proto_flags and cg_proto moved from include/net/sock.h?
Because they naturally belong to memcg header file. We can keep it there
if you prefer but I felt like sock.h is quite heavy already.
Now that I am looking into other MEMCG_KMEM related stuff there,
memcg_proto_active sounds like a good one to move to memcontrol.h as well.
> struct mem_cgroup_stat_cpu can remain private to memcontrol.c. Forward
> declare the struct in memcontrol.h.
And we cannot hide this one because of mem_cgroup_events which
dereferences stat. There are some hot code paths doing statistics and it
would be better if they can inline this trivial code.
--
Michal Hocko
SUSE Labs
--
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