Thread (61 messages) 61 messages, 5 authors, 2016-06-27

Re: [PATCH 04/27] mm, vmscan: Begin reclaiming pages on a per-node basis

From: Mel Gorman <hidden>
Date: 2016-06-23 11:07:34
Also in: lkml

On Wed, Jun 22, 2016 at 06:00:12PM +0200, Vlastimil Babka wrote:
quoted
quoted
-		enum zone_type classzone_idx;
-
		if (!populated_zone(zone))
			continue;

-		classzone_idx = requested_highidx;
+		/*
+		 * Note that reclaim_idx does not change as it is the highest
+		 * zone reclaimed from which for empty zones is a no-op but
+		 * classzone_idx is used by shrink_node to test if the slabs
+		 * should be shrunk on a given node.
+		 */
		while (!populated_zone(zone->zone_pgdat->node_zones +
-							classzone_idx))
+							classzone_idx)) {
			classzone_idx--;
+			continue;
Oh and Michal's comment on Patch 20 made me realize that my objection to v6
about possible underflow of sc->reclaim_idx and classzone_idx seems to still
apply here for classzone_idx?
Potentially. The relevant code now looks like this

                classzone_idx = sc->reclaim_idx;
                while (!populated_zone(zone->zone_pgdat->node_zones +
                                                        classzone_idx))
                        classzone_idx--;

-- 
Mel Gorman
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help