[PATCH 2/3] page-allocator: Check zone pressure when batch of pages are freed
From: Mel Gorman
Date: Mon Mar 08 2010 - 06:48:42 EST
When a batch of pages have been freed to the buddy allocator, it is possible
that it is enough to push a zone above its watermarks. This patch puts a
check in the free path for zone pressure. It's in a common path but for
the most part, it should only be checking if a linked list is empty and
have minimal performance impact.
Signed-off-by: Mel Gorman <mel@xxxxxxxxx>
---
mm/page_alloc.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 1383ff9..3c8e8b7 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -562,6 +562,9 @@ static void free_pcppages_bulk(struct zone *zone, int count,
} while (--count && --batch_free && !list_empty(list));
}
spin_unlock(&zone->lock);
+
+ /* A batch of pages have been freed so check zone pressure */
+ check_zone_pressure(zone);
}
static void free_one_page(struct zone *zone, struct page *page, int order,
--
1.6.5
--
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/