public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Hillf Danton" <hillf.zj@alibaba-inc.com>
To: "Mel Gorman" <mgorman@suse.de>
Cc: <linux-mm@kvack.org>,
	"linux-kernel" <linux-kernel@vger.kernel.org>,
	"Rik van Riel" <riel@redhat.com>,
	"Johannes Weiner" <hannes@cmpxchg.org>,
	"Michal Hocko" <mhocko@suse.cz>
Subject: Re: [PATCH 03/25] mm, vmscan: Move LRU lists to node
Date: Thu, 11 Jun 2015 15:12:12 +0800	[thread overview]
Message-ID: <00e901d0a415$f06fed80$d14fc880$@alibaba-inc.com> (raw)

> @@ -774,6 +764,21 @@ typedef struct pglist_data {
>  	ZONE_PADDING(_pad1_)
>  	spinlock_t		lru_lock;
> 
> +	/* Fields commonly accessed by the page reclaim scanner */
> +	struct lruvec		lruvec;
> +
> +	/* Evictions & activations on the inactive file list */
> +	atomic_long_t		inactive_age;
> +
> +	/*
> +	 * The target ratio of ACTIVE_ANON to INACTIVE_ANON pages on
> +	 * this zone's LRU.  Maintained by the pageout code.
> +	 */

The comment has to be updated.

> +	unsigned int inactive_ratio;
> +
> +	unsigned long		flags;
> +
> +	ZONE_PADDING(_pad2_)
>  	struct per_cpu_nodestat __percpu *per_cpu_nodestats;
>  	atomic_long_t		vm_stat[NR_VM_NODE_STAT_ITEMS];
>  } pg_data_t;
> @@ -1185,7 +1185,7 @@ struct lruvec *mem_cgroup_zone_lruvec(struct zone *zone,
>  	struct lruvec *lruvec;
> 
>  	if (mem_cgroup_disabled()) {
> -		lruvec = &zone->lruvec;
> +		lruvec = zone_lruvec(zone);
>  		goto out;
>  	}
> 
> @@ -1197,8 +1197,8 @@ out:
>  	 * we have to be prepared to initialize lruvec->zone here;
>  	 * and if offlined then reonlined, we need to reinitialize it.
>  	 */
> -	if (unlikely(lruvec->zone != zone))
> -		lruvec->zone = zone;
> +	if (unlikely(lruvec->pgdat != zone->zone_pgdat))
> +		lruvec->pgdat = zone->zone_pgdat;

See below please.

>  	return lruvec;
>  }
> 
> @@ -1211,14 +1211,14 @@ out:
>   * and putback protocol: the LRU lock must be held, and the page must
>   * either be PageLRU() or the caller must have isolated/allocated it.
>   */
> -struct lruvec *mem_cgroup_page_lruvec(struct page *page, struct zone *zone)
> +struct lruvec *mem_cgroup_page_lruvec(struct page *page, struct pglist_data *pgdat)
>  {
>  	struct mem_cgroup_per_zone *mz;
>  	struct mem_cgroup *memcg;
>  	struct lruvec *lruvec;
> 
>  	if (mem_cgroup_disabled()) {
> -		lruvec = &zone->lruvec;
> +		lruvec = &pgdat->lruvec;
>  		goto out;
>  	}
> 
> @@ -1238,8 +1238,8 @@ out:
>  	 * we have to be prepared to initialize lruvec->zone here;
>  	 * and if offlined then reonlined, we need to reinitialize it.
>  	 */
> -	if (unlikely(lruvec->zone != zone))
> -		lruvec->zone = zone;
> +	if (unlikely(lruvec->pgdat != pgdat))
> +		lruvec->pgdat = pgdat;

Given &pgdat->lruvec, we no longer need(or are able) to set lruvec->pgdat.

>  	return lruvec;
>  }


             reply	other threads:[~2015-06-11  7:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-11  7:12 Hillf Danton [this message]
2015-06-15  8:19 ` [PATCH 03/25] mm, vmscan: Move LRU lists to node Mel Gorman
  -- strict thread matches above, loose matches on Subject: below --
2015-06-08 13:56 [RFC PATCH 00/25] Move LRU page reclaim from zones to nodes Mel Gorman
2015-06-08 13:56 ` [PATCH 03/25] mm, vmscan: Move LRU lists to node Mel Gorman

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='00e901d0a415$f06fed80$d14fc880$@alibaba-inc.com' \
    --to=hillf.zj@alibaba-inc.com \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=mhocko@suse.cz \
    --cc=riel@redhat.com \
    /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