linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@suse.cz>
To: Hugh Dickins <hughd@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Balbir Singh <bsingharora@gmail.com>,
	KOSAKI Motohiro <kosaki.motohiro@gmail.com>,
	linux-mm@kvack.org
Subject: Re: [PATCH 4/5] memcg: enum lru_list lru
Date: Mon, 2 Jan 2012 14:01:53 +0100	[thread overview]
Message-ID: <20120102130153.GH7910@tiehlicka.suse.cz> (raw)
In-Reply-To: <alpine.LSU.2.00.1112312330460.18500@eggly.anvils>

On Sat 31-12-11 23:31:53, Hugh Dickins wrote:
> Mostly we use "enum lru_list lru": change those few "l"s to "lru"s.

OK, I can see that you are doing the same clean up in the generic mm
code as well.

> Signed-off-by: Hugh Dickins <hughd@google.com>

Acked-by: Michal Hocko <mhocko@suse.cz>

> ---
>  mm/memcontrol.c |   20 ++++++++++----------
>  1 file changed, 10 insertions(+), 10 deletions(-)
> 
> --- mmotm.orig/mm/memcontrol.c	2011-12-30 21:23:28.000000000 -0800
> +++ mmotm/mm/memcontrol.c	2011-12-30 21:29:03.695349263 -0800
> @@ -704,14 +704,14 @@ mem_cgroup_zone_nr_lru_pages(struct mem_
>  			unsigned int lru_mask)
>  {
>  	struct mem_cgroup_per_zone *mz;
> -	enum lru_list l;
> +	enum lru_list lru;
>  	unsigned long ret = 0;
>  
>  	mz = mem_cgroup_zoneinfo(memcg, nid, zid);
>  
> -	for_each_lru(l) {
> -		if (BIT(l) & lru_mask)
> -			ret += mz->lru_size[l];
> +	for_each_lru(lru) {
> +		if (BIT(lru) & lru_mask)
> +			ret += mz->lru_size[lru];
>  	}
>  	return ret;
>  }
> @@ -3687,10 +3687,10 @@ move_account:
>  		mem_cgroup_start_move(memcg);
>  		for_each_node_state(node, N_HIGH_MEMORY) {
>  			for (zid = 0; !ret && zid < MAX_NR_ZONES; zid++) {
> -				enum lru_list l;
> -				for_each_lru(l) {
> +				enum lru_list lru;
> +				for_each_lru(lru) {
>  					ret = mem_cgroup_force_empty_list(memcg,
> -							node, zid, l);
> +							node, zid, lru);
>  					if (ret)
>  						break;
>  				}
> @@ -4784,7 +4784,7 @@ static int alloc_mem_cgroup_per_zone_inf
>  {
>  	struct mem_cgroup_per_node *pn;
>  	struct mem_cgroup_per_zone *mz;
> -	enum lru_list l;
> +	enum lru_list lru;
>  	int zone, tmp = node;
>  	/*
>  	 * This routine is called against possible nodes.
> @@ -4802,8 +4802,8 @@ static int alloc_mem_cgroup_per_zone_inf
>  
>  	for (zone = 0; zone < MAX_NR_ZONES; zone++) {
>  		mz = &pn->zoneinfo[zone];
> -		for_each_lru(l)
> -			INIT_LIST_HEAD(&mz->lruvec.lists[l]);
> +		for_each_lru(lru)
> +			INIT_LIST_HEAD(&mz->lruvec.lists[lru]);
>  		mz->usage_in_excess = 0;
>  		mz->on_tree = false;
>  		mz->memcg = memcg;

-- 
Michal Hocko
SUSE Labs
SUSE LINUX s.r.o.
Lihovarska 1060/12
190 00 Praha 9    
Czech Republic

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.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@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2012-01-02 13:02 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-01  7:26 [PATCH 0/5] memcg: trivial cleanups Hugh Dickins
2012-01-01  7:27 ` [PATCH 1/5] memcg: replace MEM_CONT by MEM_RES_CTLR Hugh Dickins
2012-01-01  7:33   ` KOSAKI Motohiro
2012-01-02 11:53   ` Michal Hocko
2012-01-05  6:30   ` KAMEZAWA Hiroyuki
2012-01-01  7:29 ` [PATCH 2/5] memcg: replace mem and mem_cont stragglers Hugh Dickins
2012-01-01  7:34   ` KOSAKI Motohiro
2012-01-02 12:25   ` Michal Hocko
2012-01-05  6:31   ` KAMEZAWA Hiroyuki
2012-01-01  7:30 ` [PATCH 3/5] memcg: lru_size instead of MEM_CGROUP_ZSTAT Hugh Dickins
2012-01-01  7:37   ` KOSAKI Motohiro
2012-01-02 12:59   ` Michal Hocko
2012-01-02 19:43     ` Hugh Dickins
2012-01-03 11:05       ` Michal Hocko
2012-01-05  6:33   ` KAMEZAWA Hiroyuki
2012-01-05 20:14     ` Hugh Dickins
2012-01-01  7:31 ` [PATCH 4/5] memcg: enum lru_list lru Hugh Dickins
2012-01-01  7:38   ` KOSAKI Motohiro
2012-01-02 13:01   ` Michal Hocko [this message]
2012-01-05  6:34   ` KAMEZAWA Hiroyuki
2012-01-01  7:33 ` [PATCH 5/5] memcg: remove redundant returns Hugh Dickins
2012-01-01  7:38   ` KOSAKI Motohiro
2012-01-02 13:03   ` Michal Hocko
2012-01-05  6:35   ` KAMEZAWA Hiroyuki
2012-01-01 17:01 ` [PATCH 0/5] memcg: trivial cleanups Kirill A. Shutemov
2012-01-09 13:03 ` Johannes Weiner
2012-01-15  0:07   ` Hugh Dickins
2012-01-15  0:09     ` [PATCH 1/5] memcg: replace MEM_CONT by MEM_RES_CTLR Hugh Dickins
2012-01-15  0:10     ` [PATCH 2/5] memcg: replace mem and mem_cont stragglers Hugh Dickins
2012-01-15  0:12     ` [PATCH 3/5] memcg: lru_size instead of MEM_CGROUP_ZSTAT Hugh Dickins
2012-01-15  0:13     ` [PATCH 4/5] memcg: enum lru_list lru Hugh Dickins
2012-01-15  0:14     ` [PATCH 5/5] memcg: remove redundant returns Hugh Dickins
2012-01-16  9:47     ` [PATCH 0/5] memcg: trivial cleanups Michal Hocko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120102130153.GH7910@tiehlicka.suse.cz \
    --to=mhocko@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=bsingharora@gmail.com \
    --cc=hannes@cmpxchg.org \
    --cc=hughd@google.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=kosaki.motohiro@gmail.com \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).