On Fri 17-07-15 13:19:00, Andrew Morton wrote: > On Fri, 17 Jul 2015 11:18:27 -0400 Tejun Heo <tj@xxxxxxxxxx> 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, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>