[PATCH 1/5] mm, vmscan: make shrink_node decisions more node-centric -fix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch "mm, vmscan: make shrink_node decisions more node-centric"
checks whether compaction is suitable on empty nodes. This is expensive
rather than wrong but is worth fixing.

This is a fix to the mmotm patch
mm-vmscan-make-shrink_node-decisions-more-node-centric.patch

Signed-off-by: Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx>
---
 mm/vmscan.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index 864a3b1e5f8b..4fdb9e419588 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -2408,6 +2408,8 @@ static inline bool should_continue_reclaim(struct pglist_data *pgdat,
 	/* If compaction would go ahead or the allocation would succeed, stop */
 	for (z = 0; z <= sc->reclaim_idx; z++) {
 		struct zone *zone = &pgdat->node_zones[z];
+		if (!populated_zone(zone))
+			continue;
 
 		switch (compaction_suitable(zone, sc->order, 0, sc->reclaim_idx)) {
 		case COMPACT_PARTIAL:
-- 
2.6.4

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]