aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorRik van Riel <riel@redhat.com>2012-10-08 19:28:21 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-09 03:22:15 -0400
commitc654345924f7cce87bb221b89db91cba890421ba (patch)
tree980c9a496ac0e2497ef156ff5b83701295d1ecf8 /mm
parent075663d19885eb3738fd2d7dbdb8947e12563b68 (diff)
mm: remove __GFP_NO_KSWAPD
When transparent huge pages were introduced, memory compaction and swap storms were an issue, and the kernel had to be careful to not make THP allocations cause pageout or compaction. Now that we have working compaction deferral, kswapd is smart enough to invoke compaction and the quadratic behaviour around isolate_free_pages has been fixed, it should be safe to remove __GFP_NO_KSWAPD. [minchan@kernel.org: Comment fix] [mgorman@suse.de: Avoid direct reclaim for deferred compaction] Cc: Andrea Arcangeli <aarcange@redhat.com> Signed-off-by: Rik van Riel <riel@redhat.com> Signed-off-by: Mel Gorman <mgorman@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/page_alloc.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index c13ea7538891..5e92698e5395 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -2362,9 +2362,8 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order,
2362 goto nopage; 2362 goto nopage;
2363 2363
2364restart: 2364restart:
2365 if (!(gfp_mask & __GFP_NO_KSWAPD)) 2365 wake_all_kswapd(order, zonelist, high_zoneidx,
2366 wake_all_kswapd(order, zonelist, high_zoneidx, 2366 zone_idx(preferred_zone));
2367 zone_idx(preferred_zone));
2368 2367
2369 /* 2368 /*
2370 * OK, we're below the kswapd watermark and have kicked background 2369 * OK, we're below the kswapd watermark and have kicked background
@@ -2441,7 +2440,7 @@ rebalance:
2441 * system then fail the allocation instead of entering direct reclaim. 2440 * system then fail the allocation instead of entering direct reclaim.
2442 */ 2441 */
2443 if ((deferred_compaction || contended_compaction) && 2442 if ((deferred_compaction || contended_compaction) &&
2444 (gfp_mask & __GFP_NO_KSWAPD)) 2443 (gfp_mask & (__GFP_MOVABLE|__GFP_REPEAT)) == __GFP_MOVABLE)
2445 goto nopage; 2444 goto nopage;
2446 2445
2447 /* Try direct reclaim and then allocating */ 2446 /* Try direct reclaim and then allocating */