diff options
author | Tejun Heo | 2015-05-22 23:13:20 +0200 |
---|---|---|
committer | Jens Axboe | 2015-06-02 16:33:33 +0200 |
commit | 56161634e4824380a67243a4cf3fa52eb1e5d836 (patch) | |
tree | f270436ae91d6a472efc425c256f487460e9b108 /include/linux/memcontrol.h | |
parent | blkcg: always create the blkcg_gq for the root blkcg (diff) | |
download | kernel-qcow2-linux-56161634e4824380a67243a4cf3fa52eb1e5d836.tar.gz kernel-qcow2-linux-56161634e4824380a67243a4cf3fa52eb1e5d836.tar.xz kernel-qcow2-linux-56161634e4824380a67243a4cf3fa52eb1e5d836.zip |
memcg: add mem_cgroup_root_css
Add global mem_cgroup_root_css which points to the root memcg css.
This will be used by cgroup writeback support. If memcg is disabled,
it's defined as ERR_PTR(-EINVAL).
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Johannes Weiner <hannes@cmpxchg.org>
aCc: Michal Hocko <mhocko@suse.cz>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'include/linux/memcontrol.h')
-rw-r--r-- | include/linux/memcontrol.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index 5fe6411b5e54..294498f4f6fc 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h @@ -68,6 +68,8 @@ enum mem_cgroup_events_index { }; #ifdef CONFIG_MEMCG +extern struct cgroup_subsys_state *mem_cgroup_root_css; + void mem_cgroup_events(struct mem_cgroup *memcg, enum mem_cgroup_events_index idx, unsigned int nr); @@ -196,6 +198,8 @@ void mem_cgroup_split_huge_fixup(struct page *head); #else /* CONFIG_MEMCG */ struct mem_cgroup; +#define mem_cgroup_root_css ((struct cgroup_subsys_state *)ERR_PTR(-EINVAL)) + static inline void mem_cgroup_events(struct mem_cgroup *memcg, enum mem_cgroup_events_index idx, unsigned int nr) |