Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1276496

Re: [PATCH 1/2] mm, vmscan: consider isolated pages in zone_reclaimable_pages

From Vladimir Davydov <vdavydov@virtuozzo.com>
Newsgroups linux.kernel
Subject Re: [PATCH 1/2] mm, vmscan: consider isolated pages in zone_reclaimable_pages
Date 2015-11-24 15:00 +0100
Message-ID <qymiv-n6-37@gated-at.bofh.it> (permalink)
References <qykql-7Cj-1@gated-at.bofh.it> <qykql-7Cj-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Nov 24, 2015 at 12:54:59PM +0100, Michal Hocko wrote:
> From: Michal Hocko <mhocko@suse.com>
> 
> zone_reclaimable_pages counts how many pages are reclaimable in
> the given zone. This currently includes all pages on file lrus and
> anon lrus if there is an available swap storage. We do not consider
> NR_ISOLATED_{ANON,FILE} counters though which is not correct because
> these counters reflect temporarily isolated pages which are still
> reclaimable because they either get back to their LRU or get freed
> either by the page reclaim or page migration.
> 
> The number of these pages might be sufficiently high to confuse users of
> zone_reclaimable_pages (e.g. mbind can migrate large ranges of memory at
> once).

Sounds reasonable to me.

Reviewed-by: Vladimir Davydov <vdavydov@virtuozzo.com>

Thanks,
Vladimir

> 
> Suggested-by: Johannes Weiner <hannes@cmpxchg.org>
> Signed-off-by: Michal Hocko <mhocko@suse.com>
> ---
>  mm/vmscan.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index a4507ecaefbf..946d348f5040 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -197,11 +197,13 @@ static unsigned long zone_reclaimable_pages(struct zone *zone)
>  	unsigned long nr;
>  
>  	nr = zone_page_state(zone, NR_ACTIVE_FILE) +
> -	     zone_page_state(zone, NR_INACTIVE_FILE);
> +	     zone_page_state(zone, NR_INACTIVE_FILE) +
> +	     zone_page_state(zone, NR_ISOLATED_FILE);
>  
>  	if (get_nr_swap_pages() > 0)
>  		nr += zone_page_state(zone, NR_ACTIVE_ANON) +
> -		      zone_page_state(zone, NR_INACTIVE_ANON);
> +		      zone_page_state(zone, NR_INACTIVE_ANON) +
> +		      zone_page_state(zone, NR_ISOLATED_ANON);
>  
>  	return nr;
>  }
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/2] 2 zone_pages_reclaimable fixes Michal Hocko <mhocko@kernel.org> - 2015-11-24 13:00 +0100
  [PATCH 2/2] mm, vmscan: do not overestimate anonymous reclaimable pages Michal Hocko <mhocko@kernel.org> - 2015-11-24 13:00 +0100
    Re: [PATCH 2/2] mm, vmscan: do not overestimate anonymous  reclaimable pages Vladimir Davydov <vdavydov@virtuozzo.com> - 2015-11-24 14:10 +0100
      Re: [PATCH 2/2] mm, vmscan: do not overestimate anonymous  reclaimable pages Michal Hocko <mhocko@kernel.org> - 2015-11-24 14:40 +0100
  [PATCH 1/2] mm, vmscan: consider isolated pages in zone_reclaimable_pages Michal Hocko <mhocko@kernel.org> - 2015-11-24 13:00 +0100
    Re: [PATCH 1/2] mm, vmscan: consider isolated pages in  zone_reclaimable_pages Vladimir Davydov <vdavydov@virtuozzo.com> - 2015-11-24 15:00 +0100
    Re: [PATCH 1/2] mm, vmscan: consider isolated pages in  zone_reclaimable_pages Johannes Weiner <hannes@cmpxchg.org> - 2015-11-24 17:10 +0100
    Re: [PATCH 1/2] mm, vmscan: consider isolated pages in  zone_reclaimable_pages David Rientjes <rientjes@google.com> - 2015-11-25 12:10 +0100

csiph-web