vmscan: fix temp_priority in __zone_reclaim
Subsystems (3)
PATCH 3/4 vmscan: fix temp_priority in __zone_reclaim
__zone_reclaim() isn't modifying zone->prev_priority. But zone->prev_priority is used in the decision whether or not to bring mapped pages onto the inactive list. Hence there's a risk here that __zone_reclaim() will fail because zone->prev_priority ir large (ie: low urgency) and lots of mapped pages end up stuck on the active list.
Fix that up by decreasing (ie making more urgent) zone->prev_priority as __zone_reclaim() scans the zone's pages.
This bug perhaps explains why ZONE_RECLAIM_PRIORITY was created. It should be possible to remove that now, and to just start out at DEF_PRIORITY?
---
mm/vmscan.c | 1 + 1 files changed, 1 insertion(+)
mm/vmscan.c renamed from mm/vmscan.c~vmscan-fix-temp_priority-in-__zone-reclaim +1 -0
@@ -1640,6 +1640,7 @@ static int __zone_reclaim(struct zone *z*/ priority =ZONE_RECLAIM_PRIORITY ;do { +note_zone_scanning_priority (zone, priority); nr_reclaimed +=shrink_zone (priority, zone, &sc); priority--; }while (priority >=0 && nr_reclaimed < nr_pages);
_
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>