Commit 98b30ced authored by KOSAKI Motohiro's avatar KOSAKI Motohiro Committed by james toy

In old days, we didn't have sc.nr_to_reclaim and it brought

sc.swap_cluster_max misuse.

huge sc.swap_cluster_max might makes unnecessary OOM risk and no
performance benefit.

Now, we can stop its insane thing.
Signed-off-by: default avatarKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Reviewed-by: default avatarRik van Riel <riel@redhat.com>
Reviewed-by: default avatarMinchan Kim <minchan.kim@gmail.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 2d6f75d6
...@@ -2537,8 +2537,7 @@ static int __zone_reclaim(struct zone *zone, gfp_t gfp_mask, unsigned int order) ...@@ -2537,8 +2537,7 @@ static int __zone_reclaim(struct zone *zone, gfp_t gfp_mask, unsigned int order)
.may_writepage = !!(zone_reclaim_mode & RECLAIM_WRITE), .may_writepage = !!(zone_reclaim_mode & RECLAIM_WRITE),
.may_unmap = !!(zone_reclaim_mode & RECLAIM_SWAP), .may_unmap = !!(zone_reclaim_mode & RECLAIM_SWAP),
.may_swap = 1, .may_swap = 1,
.swap_cluster_max = max_t(unsigned long, nr_pages, .swap_cluster_max = SWAP_CLUSTER_MAX,
SWAP_CLUSTER_MAX),
.nr_to_reclaim = max_t(unsigned long, nr_pages, .nr_to_reclaim = max_t(unsigned long, nr_pages,
SWAP_CLUSTER_MAX), SWAP_CLUSTER_MAX),
.gfp_mask = gfp_mask, .gfp_mask = gfp_mask,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment