Skip to contentSkip to conversation

mm-vmscan-sc-reclaim_idx-must-be-a-valid-zone-index.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message May 10, 2022

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled

     Subject: mm/vmscan: sc->reclaim_idx must be a valid zone index

has been removed from the -mm tree. Its filename was
mm-vmscan-sc-reclaim_idx-must-be-a-valid-zone-index.patch

This patch was dropped because it was merged into mm-stable

------------------------------------------------------
From: Wei Yang <[email protected]>
Subject: mm/vmscan: sc->reclaim_idx must be a valid zone index

lruvec_lru_size() is only used in get_scan_count(), so the only possible zone_idx is sc->reclaim_idx. Since sc->reclaim_idx is ensured to be a valid zone idex, we can remove the extra check for zone iteration.

---

 mm/vmscan.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
mm/vmscan.c renamed from mm/vmscan.c~mm-vmscan-sc-reclaim_idx-must-be-a-valid-zone-index +2 -2
@@ -587,7 +587,7 @@ unsigned long zone_reclaimable_pages(str
  * lruvec_lru_size -  Returns the number of pages on the given LRU list.
  * @lruvec: lru vector
  * @lru: lru to use
- * @zone_idx: zones to consider (use MAX_NR_ZONES for the whole LRU list)
+ * @zone_idx: zones to consider (use MAX_NR_ZONES - 1 for the whole LRU list)
  */
 static unsigned long lruvec_lru_size(struct lruvec *lruvec, enum lru_list lru,
 				     int zone_idx)
@@ -595,7 +595,7 @@ static unsigned long lruvec_lru_size(str
 	unsigned long size = 0;
 	int zid;
 
-	for (zid = 0; zid <= zone_idx && zid < MAX_NR_ZONES; zid++) {
+	for (zid = 0; zid <= zone_idx; zid++) {
 		struct zone *zone = &lruvec_pgdat(lruvec)->node_zones[zid];
 
 		if (!managed_zone(zone))

_

Patches currently in -mm which might be from [email protected] are

mm-vmscan-not-necessary-to-re-init-the-list-for-each-iteration.patch mm-vmscan-filter-empty-page_list-at-the-beginning.patch mm-vmscan-not-use-numa_no_node-as-indicator-of-page-on-different-node.patch