Re: [patch 2/2 v2] vmscan: clip swap_cluster_max in shrink_all_memory()

From: KOSAKI Motohiro
Date: Thu Feb 12 2009 - 22:16:15 EST


> Signed-off-by: Johannes Weiner <hannes@xxxxxxxxxxx>
> Reviewed-by: MinChan Kim <minchan.kim@xxxxxxxxx>
> Acked-by: Nigel Cunningham <ncunningham@xxxxxxxxxxx>
> Acked-by: "Rafael J. Wysocki" <rjw@xxxxxxx>
> Cc: KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxxxxxxx>
> Cc: Rik van Riel <riel@xxxxxxxxxx>
>
>
> ---
> 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@xxxxxxxxxxxxxx>



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/