On 07/08/2016 11:34 AM, Mel Gorman wrote:
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_HIGHMEM
request of some description.  On 64-bit, ZONE_DMA32 requests 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.

Signed-off-by: Mel Gorman <mgor...@techsingularity.net>
Acked-by: Hillf Danton <hillf...@alibaba-inc.com>

I think my previous complaints are fixed.

Acked-by: Vlastimil Babka <vba...@suse.cz>

[...]

@@ -2553,7 +2572,7 @@ static void shrink_zones(struct zonelist *zonelist, 
struct scan_control *sc)
        unsigned long nr_soft_reclaimed;
        unsigned long nr_soft_scanned;
        gfp_t orig_mask;
-       enum zone_type requested_highidx = gfp_zone(sc->gfp_mask);
+       enum zone_type classzone_idx;

        /*
         * If the number of buffer_heads in the machine exceeds the maximum
@@ -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);

Setting classzone_idx seems pointless here as it will be overwritten in the for loop. Unless that changes with some later patch. Anyway it doesn't hurt anything.

Reply via email to