diff mbox series

[PATCHv2,10/11] mm/vmscan: Do not demote PG_dropbehind folios

Message ID 20250115093135.3288234-11-kirill.shutemov@linux.intel.com (mailing list archive)
State New
Headers show
Series Get rid of PG_reclaim and rename PG_dropbehind | expand

Commit Message

Kirill A. Shutemov Jan. 15, 2025, 9:31 a.m. UTC
PG_dropbehind flag indicates that the folio need to be freed immediately.
No point in demoting it.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
---
 mm/vmscan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/mm/vmscan.c b/mm/vmscan.c
index e61e88e63511..0b8a6e0f384c 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1235,7 +1235,7 @@  static unsigned int shrink_folio_list(struct list_head *folio_list,
 		 * Before reclaiming the folio, try to relocate
 		 * its contents to another node.
 		 */
-		if (do_demote_pass &&
+		if (do_demote_pass && !folio_test_dropbehind(folio) &&
 		    (thp_migration_supported() || !folio_test_large(folio))) {
 			list_add(&folio->lru, &demote_folios);
 			folio_unlock(folio);