Commit c0ff4b85 authored by Raghavendra K T's avatar Raghavendra K T Committed by Linus Torvalds

memcg: rename mem variable to memcg

The memcg code sometimes uses "struct mem_cgroup *mem" and sometimes uses
"struct mem_cgroup *memcg".  Rename all mem variables to memcg in source
file.
Signed-off-by: default avatarRaghavendra K T <raghavendra.kt@linux.vnet.ibm.com>
Acked-by: default avatarKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: default avatarMichal Hocko <mhocko@suse.cz>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent ff7ee93f
...@@ -78,8 +78,8 @@ extern void mem_cgroup_uncharge_end(void); ...@@ -78,8 +78,8 @@ extern void mem_cgroup_uncharge_end(void);
extern void mem_cgroup_uncharge_page(struct page *page); extern void mem_cgroup_uncharge_page(struct page *page);
extern void mem_cgroup_uncharge_cache_page(struct page *page); extern void mem_cgroup_uncharge_cache_page(struct page *page);
extern void mem_cgroup_out_of_memory(struct mem_cgroup *mem, gfp_t gfp_mask); extern void mem_cgroup_out_of_memory(struct mem_cgroup *memcg, gfp_t gfp_mask);
int task_in_mem_cgroup(struct task_struct *task, const struct mem_cgroup *mem); int task_in_mem_cgroup(struct task_struct *task, const struct mem_cgroup *memcg);
extern struct mem_cgroup *try_get_mem_cgroup_from_page(struct page *page); extern struct mem_cgroup *try_get_mem_cgroup_from_page(struct page *page);
extern struct mem_cgroup *mem_cgroup_from_task(struct task_struct *p); extern struct mem_cgroup *mem_cgroup_from_task(struct task_struct *p);
...@@ -88,19 +88,19 @@ extern struct mem_cgroup *try_get_mem_cgroup_from_mm(struct mm_struct *mm); ...@@ -88,19 +88,19 @@ extern struct mem_cgroup *try_get_mem_cgroup_from_mm(struct mm_struct *mm);
static inline static inline
int mm_match_cgroup(const struct mm_struct *mm, const struct mem_cgroup *cgroup) int mm_match_cgroup(const struct mm_struct *mm, const struct mem_cgroup *cgroup)
{ {
struct mem_cgroup *mem; struct mem_cgroup *memcg;
rcu_read_lock(); rcu_read_lock();
mem = mem_cgroup_from_task(rcu_dereference((mm)->owner)); memcg = mem_cgroup_from_task(rcu_dereference((mm)->owner));
rcu_read_unlock(); rcu_read_unlock();
return cgroup == mem; return cgroup == memcg;
} }
extern struct cgroup_subsys_state *mem_cgroup_css(struct mem_cgroup *mem); extern struct cgroup_subsys_state *mem_cgroup_css(struct mem_cgroup *memcg);
extern int extern int
mem_cgroup_prepare_migration(struct page *page, mem_cgroup_prepare_migration(struct page *page,
struct page *newpage, struct mem_cgroup **ptr, gfp_t gfp_mask); struct page *newpage, struct mem_cgroup **ptr, gfp_t gfp_mask);
extern void mem_cgroup_end_migration(struct mem_cgroup *mem, extern void mem_cgroup_end_migration(struct mem_cgroup *memcg,
struct page *oldpage, struct page *newpage, bool migration_ok); struct page *oldpage, struct page *newpage, bool migration_ok);
/* /*
...@@ -148,7 +148,7 @@ static inline void mem_cgroup_dec_page_stat(struct page *page, ...@@ -148,7 +148,7 @@ static inline void mem_cgroup_dec_page_stat(struct page *page,
unsigned long mem_cgroup_soft_limit_reclaim(struct zone *zone, int order, unsigned long mem_cgroup_soft_limit_reclaim(struct zone *zone, int order,
gfp_t gfp_mask, gfp_t gfp_mask,
unsigned long *total_scanned); unsigned long *total_scanned);
u64 mem_cgroup_get_limit(struct mem_cgroup *mem); u64 mem_cgroup_get_limit(struct mem_cgroup *memcg);
void mem_cgroup_count_vm_event(struct mm_struct *mm, enum vm_event_item idx); void mem_cgroup_count_vm_event(struct mm_struct *mm, enum vm_event_item idx);
#ifdef CONFIG_TRANSPARENT_HUGEPAGE #ifdef CONFIG_TRANSPARENT_HUGEPAGE
...@@ -244,18 +244,20 @@ static inline struct mem_cgroup *try_get_mem_cgroup_from_mm(struct mm_struct *mm ...@@ -244,18 +244,20 @@ static inline struct mem_cgroup *try_get_mem_cgroup_from_mm(struct mm_struct *mm
return NULL; return NULL;
} }
static inline int mm_match_cgroup(struct mm_struct *mm, struct mem_cgroup *mem) static inline int mm_match_cgroup(struct mm_struct *mm,
struct mem_cgroup *memcg)
{ {
return 1; return 1;
} }
static inline int task_in_mem_cgroup(struct task_struct *task, static inline int task_in_mem_cgroup(struct task_struct *task,
const struct mem_cgroup *mem) const struct mem_cgroup *memcg)
{ {
return 1; return 1;
} }
static inline struct cgroup_subsys_state *mem_cgroup_css(struct mem_cgroup *mem) static inline struct cgroup_subsys_state
*mem_cgroup_css(struct mem_cgroup *memcg)
{ {
return NULL; return NULL;
} }
...@@ -267,22 +269,22 @@ mem_cgroup_prepare_migration(struct page *page, struct page *newpage, ...@@ -267,22 +269,22 @@ mem_cgroup_prepare_migration(struct page *page, struct page *newpage,
return 0; return 0;
} }
static inline void mem_cgroup_end_migration(struct mem_cgroup *mem, static inline void mem_cgroup_end_migration(struct mem_cgroup *memcg,
struct page *oldpage, struct page *newpage, bool migration_ok) struct page *oldpage, struct page *newpage, bool migration_ok)
{ {
} }
static inline int mem_cgroup_get_reclaim_priority(struct mem_cgroup *mem) static inline int mem_cgroup_get_reclaim_priority(struct mem_cgroup *memcg)
{ {
return 0; return 0;
} }
static inline void mem_cgroup_note_reclaim_priority(struct mem_cgroup *mem, static inline void mem_cgroup_note_reclaim_priority(struct mem_cgroup *memcg,
int priority) int priority)
{ {
} }
static inline void mem_cgroup_record_reclaim_priority(struct mem_cgroup *mem, static inline void mem_cgroup_record_reclaim_priority(struct mem_cgroup *memcg,
int priority) int priority)
{ {
} }
...@@ -348,7 +350,7 @@ unsigned long mem_cgroup_soft_limit_reclaim(struct zone *zone, int order, ...@@ -348,7 +350,7 @@ unsigned long mem_cgroup_soft_limit_reclaim(struct zone *zone, int order,
} }
static inline static inline
u64 mem_cgroup_get_limit(struct mem_cgroup *mem) u64 mem_cgroup_get_limit(struct mem_cgroup *memcg)
{ {
return 0; return 0;
} }
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment