aboutsummaryrefslogtreecommitdiffstats
path: root/mm/memcontrol.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2015-09-18 18:01:59 -0400
committerTejun Heo <tj@kernel.org>2015-09-21 15:14:47 -0400
commit472912a2b5e2027efd58aa47f78acb2373675187 (patch)
treea555fffaffdd8b19c530c722770016092997f111 /mm/memcontrol.c
parentcgroup: generalize obtaining the handles of and notifying cgroup files (diff)
downloadlinux-dev-472912a2b5e2027efd58aa47f78acb2373675187.tar.xz
linux-dev-472912a2b5e2027efd58aa47f78acb2373675187.zip
memcg: generate file modified notifications on "memory.events"
cgroup core only recently grew generic notification support. Wire up "memory.events" so that it triggers a file modified event whenever its content changes. v2: Refreshed on top of mem_cgroup relocation. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Michal Hocko <mhocko@kernel.org> Acked-by: Johannes Weiner <hannes@cmpxchg.org> Cc: Li Zefan <lizefan@huawei.com>
Diffstat (limited to 'mm/memcontrol.c')
-rw-r--r--mm/memcontrol.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index e672f2689326..9f331402e502 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -5202,6 +5202,7 @@ static struct cftype memory_files[] = {
{
.name = "events",
.flags = CFTYPE_NOT_ON_ROOT,
+ .file_offset = offsetof(struct mem_cgroup, events_file),
.seq_show = memory_events_show,
},
{ } /* terminate */