Re: [PATCH 09/33] mm: system wide ALLOC_NO_WATERMARK

Previous thread: [PATCH 18/33] netvm: INET reserves. by Peter Zijlstra on Tuesday, October 30, 2007 - 9:04 am. (1 message)

Next thread: [PATCH 11/33] mm: memory reserve management by Peter Zijlstra on Tuesday, October 30, 2007 - 9:04 am. (1 message)
From: Peter Zijlstra
Date: Tuesday, October 30, 2007 - 9:04 am

Change ALLOC_NO_WATERMARK page allocation such that the reserves are system
wide - which they are per setup_per_zone_pages_min(), when we scrape the
barrel, do it properly.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
---
 mm/page_alloc.c |    6 ++++++
 1 file changed, 6 insertions(+)

Index: linux-2.6/mm/page_alloc.c
===================================================================
--- linux-2.6.orig/mm/page_alloc.c
+++ linux-2.6/mm/page_alloc.c
@@ -1638,6 +1638,12 @@ restart:
 rebalance:
 	if (alloc_flags & ALLOC_NO_WATERMARKS) {
 nofail_alloc:
+		/*
+		 * break out of mempolicy boundaries
+		 */
+		zonelist = NODE_DATA(numa_node_id())->node_zonelists +
+			gfp_zone(gfp_mask);
+
 		/* go through the zonelist yet again, ignoring mins */
 		page = get_page_from_freelist(gfp_mask, order, zonelist,
 				ALLOC_NO_WATERMARKS);

--

-

From: Nick Piggin
Date: Tuesday, October 30, 2007 - 8:52 pm

IIRC it's actually not too uncommon to have allocations coming here via
page reclaim. It's not exactly clear that you want to break mempolicies
-

From: Peter Zijlstra
Date: Wednesday, October 31, 2007 - 3:45 am

Hmm, the way I see it is that mempolicies are mainly for user-space
allocations, reserve allocations are always kernel allocations. These
already break mempolicies - for example hardirq context allocations.

Also, as it stands, the reserve is spread out evenly over all
zones/nodes (excluding highmem), so by restricting ourselves to a
subset, we don't have access to the full reserve.

Previous thread: [PATCH 18/33] netvm: INET reserves. by Peter Zijlstra on Tuesday, October 30, 2007 - 9:04 am. (1 message)

Next thread: [PATCH 11/33] mm: memory reserve management by Peter Zijlstra on Tuesday, October 30, 2007 - 9:04 am. (1 message)