[PATCHSET cgroup/for-3.12] cgroup: make cgroup_event specific to memcg

From: Tejun Heo
Date: Sun Aug 04 2013 - 12:07:42 EST


Like many other things in cgroup, cgroup_event is way too flexible and
complex - it strives to provide completely flexible event monitoring
facility in cgroup proper which allows any number of users to monitor
custom events. This is overboard, to say the least, and I strongly
think that cgroup should not any new usages of this facility and
preferably deprecate the existing usages if at all possible.

Fortunately, memcg along with vmpressure is the only user of the
facility and gets to keep it. This patchset makes cgroup_event
specific to memcg, moves all related code into mm/memcontrol.c and
renames it to mem_cgroup_event so that its usage can't spread to other
subsystems and later deprecation and cleanup can be localized.

Note that after this patchset, cgroup.event_control file exists only
for the hierarchy which has memcg attached to it. This is a userland
visible change but unlikely to be noticeable as the file has never
been meaningful outside memcg. If this ever becomes problematic, we
can add a dummy file on hierarchies w/o memcg when !sane_behavior.

This patchset is consited of the following five patches.


The patchset is on top of

cgroup/for-3.12 61584e3f4 ("cgroup: Merge branch 'for-3.11-fixes' into for-3.12")
+ [1] cgroup: use cgroup_subsys_state as the primary subsystem interface handle

and available in the following branch.

git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git review-memcg_event

diffstat follows.

Documentation/cgroups/cgroups.txt | 19 --
include/linux/cgroup.h | 29 ---
include/linux/vmpressure.h | 1
kernel/cgroup.c | 265 +--------------------------------
mm/memcontrol.c | 302 ++++++++++++++++++++++++++++++++++++--
5 files changed, 315 insertions(+), 301 deletions(-)



[1] https://lkml.org/lkml/2013/8/1/722
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/