[PATCHv2 10/11] mm/vmscan: Do not demote PG_dropbehind folios
From: Kirill A. Shutemov
Date: Wed Jan 15 2025 - 04:33:30 EST
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@xxxxxxxxxxxxxxx>
---
mm/vmscan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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);
--
2.45.2