lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110811080500.GC8023@tiehlicka.suse.cz>
Date:	Thu, 11 Aug 2011 10:05:00 +0200
From:	Michal Hocko <mhocko@...e.cz>
To:	Raghavendra K T <raghavendra.kt@...ux.vnet.ibm.com>
Cc:	Arend van Spriel <arend@...adcom.com>,
	Greg Kroah-Hartman <gregkh@...e.de>,
	"David S. Miller" <davem@...emloft.net>,
	"nishimura@....nes.nec.co.jp" <nishimura@....nes.nec.co.jp>,
	Balbir Singh <bsingharora@...il.com>,
	"John W. Linville" <linville@...driver.com>,
	Mauro Carvalho Chehab <mchehab@...hat.com>,
	"linux-mm@...ck.org" <linux-mm@...ck.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Ying Han <yinghan@...gle.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
	Srivatsa Vaddagiri <vatsa@...ux.vnet.ibm.com>
Subject: Re: [PATCH 2/2][cleanup] memcg: renaming of mem variable to memcg

On Wed 10-08-11 22:59:42, Raghavendra K T wrote:
>  The memcg code sometimes uses "struct mem_cgroup *mem" and sometimes uses
>  "struct mem_cgroup *memcg". This patch renames all mem variables to memcg in header file.

Any reason (other than that this is a different file) to have this as a
separate patch?

> 
> From: Raghavendra K T <raghavendra.kt@...ux.vnet.ibm.com>
> Signed-off-by: Raghavendra K T <raghavendra.kt@...ux.vnet.ibm.com>
> ---
> diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
> index 5633f51..fb1ed1c 100644
> --- a/include/linux/memcontrol.h
> +++ b/include/linux/memcontrol.h
> @@ -88,8 +88,8 @@ extern void mem_cgroup_uncharge_end(void);
>  extern void mem_cgroup_uncharge_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);
> -int task_in_mem_cgroup(struct task_struct *task, const struct mem_cgroup *mem);
> +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 *memcg);
>  
>  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);
> @@ -98,19 +98,19 @@ extern struct mem_cgroup *try_get_mem_cgroup_from_mm(struct mm_struct *mm);
>  static inline
>  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();
> -	mem = mem_cgroup_from_task(rcu_dereference((mm)->owner));
> +	memcg = mem_cgroup_from_task(rcu_dereference((mm)->owner));
>  	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
>  mem_cgroup_prepare_migration(struct page *page,
>  	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);
>  
>  /*
> @@ -167,7 +167,7 @@ static inline void mem_cgroup_dec_page_stat(struct page *page,
>  unsigned long mem_cgroup_soft_limit_reclaim(struct zone *zone, int order,
>  						gfp_t gfp_mask,
>  						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);
>  #ifdef CONFIG_TRANSPARENT_HUGEPAGE
> @@ -263,18 +263,20 @@ static inline struct mem_cgroup *try_get_mem_cgroup_from_mm(struct mm_struct *mm
>  	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;
>  }
>  
>  static inline int task_in_mem_cgroup(struct task_struct *task,
> -				     const struct mem_cgroup *mem)
> +				     const struct mem_cgroup *memcg)
>  {
>  	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;
>  }
> @@ -286,22 +288,22 @@ mem_cgroup_prepare_migration(struct page *page, struct page *newpage,
>  	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)
>  {
>  }
>  
> -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;
>  }
>  
> -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)
>  {
>  }
>  
> -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)
>  {
>  }
> @@ -367,7 +369,7 @@ unsigned long mem_cgroup_soft_limit_reclaim(struct zone *zone, int order,
>  }
>  
>  static inline
> -u64 mem_cgroup_get_limit(struct mem_cgroup *mem)
> +u64 mem_cgroup_get_limit(struct mem_cgroup *memcg)
>  {
>  	return 0;
>  }
> 
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@...ck.org.  For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
> Don't email: <a href=mailto:"dont@...ck.org"> email@...ck.org </a>

-- 
Michal Hocko
SUSE Labs
SUSE LINUX s.r.o.
Lihovarska 1060/12
190 00 Praha 9    
Czech Republic
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ