mm, vmscan: begin reclaiming pages on a per-node basis
Review static void shrink_zones(struct zonelist *zonelist, struct scan_control *sc) · line 2587
Quoted 10 lines
(quoted diff) +3
-1@@ -2561,17 +2580,23 @@ static void shrink_zones(struct zonelist *zonelist, struct scan_control *sc) * highmem pages could be pinning lowmem pages storing buffer_heads */ orig_mask = sc->gfp_mask; - if (buffer_heads_over_limit) + if (buffer_heads_over_limit) { sc->gfp_mask |= __GFP_HIGHMEM; + sc->reclaim_idx = classzone_idx = gfp_zone(sc->gfp_mask); + }
We need to push/pop ->reclaim_idx as ->gfp_mask handled?
thanks
Hillf
--
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>
Quoted 12 lines · Hillf Danton
Review static void shrink_zones(struct zonelist *zonelist, struct scan_control *sc) · line 2587
Quoted 10 lines
(quoted diff) +3
-1@@ -2561,17 +2580,23 @@ static void shrink_zones(struct zonelist *zonelist, struct scan_control *sc) * highmem pages could be pinning lowmem pages storing buffer_heads */ orig_mask = sc->gfp_mask; - if (buffer_heads_over_limit) + if (buffer_heads_over_limit) { sc->gfp_mask |= __GFP_HIGHMEM; + sc->reclaim_idx = classzone_idx = gfp_zone(sc->gfp_mask); + }We need to push/pop ->reclaim_idx as ->gfp_mask handled?
I saw no harm in having one full reclaim attempt reclaiming from all zones if buffer_heads_over_limit was triggered. If it fails, the page allocator will loop again and reset the reclaim_idx.
Signature · 8 lines
Mel Gorman SUSE Labs -- 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>
Hillf Danton
Acked-byQuoted 11 lines
This patch makes reclaim decisions on a per-node basis. A reclaimer knows what zone is required by the allocation request and skips pages from higher zones. In many cases this will be ok because it's a
GFP_HIGHMEMrequest of some description. On 64-bit,ZONE_DMA32requests will cause some problems but 32-bit devices on 64-bit platforms are increasingly rare. Historically it would have been a major problem on 32-bit with big Highmem:Lowmem ratios but such configurations are also now rare and even where they exist, they are not encouraged. If it really becomes a problem, it'll manifest as very low reclaim efficiencies.
Quoted 2 lines
Signed-off-by Mel Gorman <[email protected]>---
Quoted 2 lines
mm/vmscan.c | 79 ++++++++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 55 insertions(+), 24 deletions(-)
--
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>