On Fri 17-07-15 13:19:00, Andrew Morton wrote: > On Fri, 17 Jul 2015 11:18:27 -0400 Tejun Heo <[email protected]> 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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

