mm, memcontrol: implement memory.swap.events
[linux-2.6-microblaze.git] / include / linux / memcontrol.h
index d99b71b..517096c 100644 (file)
@@ -53,6 +53,8 @@ enum memcg_memory_event {
        MEMCG_HIGH,
        MEMCG_MAX,
        MEMCG_OOM,
+       MEMCG_SWAP_MAX,
+       MEMCG_SWAP_FAIL,
        MEMCG_NR_MEMORY_EVENTS,
 };
 
@@ -208,6 +210,9 @@ struct mem_cgroup {
        atomic_long_t memory_events[MEMCG_NR_MEMORY_EVENTS];
        struct cgroup_file events_file;
 
+       /* handle for "memory.swap.events" */
+       struct cgroup_file swap_events_file;
+
        /* protect arrays of thresholds */
        struct mutex thresholds_lock;