Skip to contentSkip to conversation

mm/mglru: remove the unused scan_control argument of isolate_folio()

PATCH In review Chuanhua Han 3 participants 3 messages Dec 3

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 mm/mglru: remove the unused scan_control argument of isolate_folio()

From: Chuanhua Han <[email protected]>

Since commit acd22fbb9f47 ("mm/mglru: remove redundant swap constrained check upon isolation") removed the sc->gfp_mask check, isolate_folio() no longer uses its scan_control argument. Remove it.

No functional change.

---
v2:
- Fix the From/Signed-off-by mismatch (Barry, Andrew)
- Add Reviewed-by from Barry
v1: https://lore.kernel.org/linux-mm/[email protected]/

 mm/vmscan.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
mm/vmscan.c +2 -2
index 99cb209797b4..1bb6bcfb041d 100644
@@ -4798,7 +4798,7 @@ static bool sort_folio(struct lruvec *lruvec, struct folio *folio, struct scan_c
 	return false;
 }
 
-static bool isolate_folio(struct lruvec *lruvec, struct folio *folio, struct scan_control *sc)
+static bool isolate_folio(struct lruvec *lruvec, struct folio *folio)
 {
 	bool success;
 
@@ -4894,7 +4894,7 @@ static int scan_folios(unsigned long nr_to_scan, struct lruvec *lruvec,
 			scanned += delta;
 			if (sort_folio(lruvec, folio, sc, gen, max_gen, tier))
 				sorted += delta;
-			else if (isolate_folio(lruvec, folio, sc)) {
+			else if (isolate_folio(lruvec, folio)) {
 				list_add(&folio->lru, list);
 				isolated += delta;
 			} else {
Signature · 1 line
2.34.1
reviewer Reviewed-by on v2 1/1
#1 lore raw
Quoted 10 lines · Chuanhua Han

From: Chuanhua Han <[email protected]>

Since commit acd22fbb9f47 ("mm/mglru: remove redundant swap constrained check upon isolation") removed the sc->gfp_mask check, isolate_folio() no longer uses its scan_control argument. Remove it.

No functional change.

Quoted 9 lines

---
v2:
- Fix the From/Signed-off-by mismatch (Barry, Andrew)
- Add Reviewed-by from Barry
v1: https://lore.kernel.org/linux-mm/[email protected]/

  mm/vmscan.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

Thanks,
Qi

reviewer Reviewed-by on v2 1/1
#2 lore raw
In reply to Chuanhua Han
Quoted 6 lines · Chuanhua Han

From: Chuanhua Han <[email protected]>

Since commit acd22fbb9f47 ("mm/mglru: remove redundant swap constrained check upon isolation") removed the sc->gfp_mask check, isolate_folio() no longer uses its scan_control argument. Remove it.

Quoted 6 lines

No functional change.

---
v2:

~~~~~
v1->v2:

Quoted 6 lines

- Fix the From/Signed-off-by mismatch (Barry, Andrew)
- Add Reviewed-by from Barry
v1: https://lore.kernel.org/linux-mm/[email protected]/

 mm/vmscan.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

LGTM,

Quoted 26 lines
mm/vmscan.c +2 -2
index 99cb209797b4..1bb6bcfb041d 100644
@@ -4798,7 +4798,7 @@ static bool sort_folio(struct lruvec *lruvec, struct folio *folio, struct scan_c
 	return false;
 }
 
-static bool isolate_folio(struct lruvec *lruvec, struct folio *folio, struct scan_control *sc)
+static bool isolate_folio(struct lruvec *lruvec, struct folio *folio)
 {
 	bool success;
 
@@ -4894,7 +4894,7 @@ static int scan_folios(unsigned long nr_to_scan, struct lruvec *lruvec,
 			scanned += delta;
 			if (sort_folio(lruvec, folio, sc, gen, max_gen, tier))
 				sorted += delta;
-			else if (isolate_folio(lruvec, folio, sc)) {
+			else if (isolate_folio(lruvec, folio)) {
 				list_add(&folio->lru, list);
 				isolated += delta;
 			} else {
Signature · 1 line
2.34.1