linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
To: MinChan Kim <minchan.kim@gmail.com>
Cc: kosaki.motohiro@jp.fujitsu.com,
	Andrew Morton <akpm@linux-foundation.org>,
	Johannes Weiner <hannes@cmpxchg.org>,
	"Rafael J. Wysocki" <rjw@sisk.pl>,
	Nigel Cunningham <ncunningham-lkml@crca.org.au>,
	Rik van Riel <riel@redhat.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [patch 2/2 v2] vmscan: clip swap_cluster_max in shrink_all_memory()
Date: Fri, 13 Feb 2009 12:14:57 +0900 (JST)	[thread overview]
Message-ID: <20090213121412.0A67.KOSAKI.MOTOHIRO@jp.fujitsu.com> (raw)
In-Reply-To: <20090213091615.28e6a689.minchan.kim@barrios-desktop>

> Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
> Reviewed-by: MinChan Kim <minchan.kim@gmail.com>
> Acked-by: Nigel Cunningham <ncunningham@crca.org.au>
> Acked-by: "Rafael J. Wysocki" <rjw@sisk.pl>
> Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
> Cc: Rik van Riel <riel@redhat.com>
> 
> 
> ---
>  mm/vmscan.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index 172e394..ed329c4 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -2114,7 +2114,6 @@ unsigned long shrink_all_memory(unsigned long nr_pages)
>  	struct scan_control sc = {
>  		.gfp_mask = GFP_KERNEL,
>  		.may_unmap = 0,
> -		.swap_cluster_max = nr_pages,
>  		.may_writepage = 1,
>  		.isolate_pages = isolate_pages_global,
>  	};
> @@ -2156,6 +2155,7 @@ unsigned long shrink_all_memory(unsigned long nr_pages)
>  			unsigned long nr_to_scan = nr_pages - sc.nr_reclaimed;
>  
>  			sc.nr_scanned = 0;
> +			sc.swap_cluster_max = nr_to_scan;
>  			shrink_all_zones(nr_to_scan, prio, pass, &sc);
>  			if (sc.nr_reclaimed >= nr_pages) 
>  				goto out;

good catch.

	Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>



--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      reply	other threads:[~2009-02-13  3:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-13  0:16 MinChan Kim
2009-02-13  3:14 ` KOSAKI Motohiro [this message]

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=20090213121412.0A67.KOSAKI.MOTOHIRO@jp.fujitsu.com \
    --to=kosaki.motohiro@jp.fujitsu.com \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan.kim@gmail.com \
    --cc=ncunningham-lkml@crca.org.au \
    --cc=riel@redhat.com \
    --cc=rjw@sisk.pl \
    /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