mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
ec13b1d6f0
commit
56161634e4
2 changed files with 6 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue