diff options
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r-- | mm/page_alloc.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index aa6fcc7ca66f..08360aa111f9 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -486,7 +486,7 @@ static void free_one_page(struct zone *zone, struct page *page, int order) | |||
486 | spin_lock(&zone->lock); | 486 | spin_lock(&zone->lock); |
487 | zone->all_unreclaimable = 0; | 487 | zone->all_unreclaimable = 0; |
488 | zone->pages_scanned = 0; | 488 | zone->pages_scanned = 0; |
489 | __free_one_page(page, zone ,order); | 489 | __free_one_page(page, zone, order); |
490 | spin_unlock(&zone->lock); | 490 | spin_unlock(&zone->lock); |
491 | } | 491 | } |
492 | 492 | ||
@@ -926,7 +926,7 @@ int zone_watermark_ok(struct zone *z, int order, unsigned long mark, | |||
926 | } | 926 | } |
927 | 927 | ||
928 | /* | 928 | /* |
929 | * get_page_from_freeliest goes through the zonelist trying to allocate | 929 | * get_page_from_freelist goes through the zonelist trying to allocate |
930 | * a page. | 930 | * a page. |
931 | */ | 931 | */ |
932 | static struct page * | 932 | static struct page * |
@@ -948,8 +948,8 @@ get_page_from_freelist(gfp_t gfp_mask, unsigned int order, | |||
948 | zone->zone_pgdat != zonelist->zones[0]->zone_pgdat)) | 948 | zone->zone_pgdat != zonelist->zones[0]->zone_pgdat)) |
949 | break; | 949 | break; |
950 | if ((alloc_flags & ALLOC_CPUSET) && | 950 | if ((alloc_flags & ALLOC_CPUSET) && |
951 | !cpuset_zone_allowed(zone, gfp_mask)) | 951 | !cpuset_zone_allowed(zone, gfp_mask)) |
952 | continue; | 952 | continue; |
953 | 953 | ||
954 | if (!(alloc_flags & ALLOC_NO_WATERMARKS)) { | 954 | if (!(alloc_flags & ALLOC_NO_WATERMARKS)) { |
955 | unsigned long mark; | 955 | unsigned long mark; |
@@ -959,17 +959,18 @@ get_page_from_freelist(gfp_t gfp_mask, unsigned int order, | |||
959 | mark = zone->pages_low; | 959 | mark = zone->pages_low; |
960 | else | 960 | else |
961 | mark = zone->pages_high; | 961 | mark = zone->pages_high; |
962 | if (!zone_watermark_ok(zone , order, mark, | 962 | if (!zone_watermark_ok(zone, order, mark, |
963 | classzone_idx, alloc_flags)) | 963 | classzone_idx, alloc_flags)) { |
964 | if (!zone_reclaim_mode || | 964 | if (!zone_reclaim_mode || |
965 | !zone_reclaim(zone, gfp_mask, order)) | 965 | !zone_reclaim(zone, gfp_mask, order)) |
966 | continue; | 966 | continue; |
967 | } | ||
967 | } | 968 | } |
968 | 969 | ||
969 | page = buffered_rmqueue(zonelist, zone, order, gfp_mask); | 970 | page = buffered_rmqueue(zonelist, zone, order, gfp_mask); |
970 | if (page) { | 971 | if (page) |
971 | break; | 972 | break; |
972 | } | 973 | |
973 | } while (*(++z) != NULL); | 974 | } while (*(++z) != NULL); |
974 | return page; | 975 | return page; |
975 | } | 976 | } |
@@ -1005,9 +1006,8 @@ restart: | |||
1005 | if (page) | 1006 | if (page) |
1006 | goto got_pg; | 1007 | goto got_pg; |
1007 | 1008 | ||
1008 | do { | 1009 | for (z = zonelist->zones; *z; z++) |
1009 | wakeup_kswapd(*z, order); | 1010 | wakeup_kswapd(*z, order); |
1010 | } while (*(++z)); | ||
1011 | 1011 | ||
1012 | /* | 1012 | /* |
1013 | * OK, we're below the kswapd watermark and have kicked background | 1013 | * OK, we're below the kswapd watermark and have kicked background |