Message ID | 20250130100050.1868208-2-kirill.shutemov@linux.intel.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | Get rid of PG_reclaim and rename PG_dropbehind | expand |
On Thu, Jan 30, 2025 at 3:01 AM Kirill A. Shutemov <kirill.shutemov@linux.intel.com> wrote: > > Do not lose the flag on page migration. > > Ideally, these folios should be freed instead of migration. But it > requires to find right spot do this and proper testing. > > Transfer the flag for now. > > Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Acked-by: Yu Zhao <yuzhao@google.com>
diff --git a/mm/migrate.c b/mm/migrate.c index fb19a18892c8..1fb0698273f7 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -682,6 +682,10 @@ void folio_migrate_flags(struct folio *newfolio, struct folio *folio) if (folio_test_dirty(folio)) folio_set_dirty(newfolio); + /* TODO: free the folio on migration? */ + if (folio_test_dropbehind(folio)) + folio_set_dropbehind(newfolio); + if (folio_test_young(folio)) folio_set_young(newfolio); if (folio_test_idle(folio))
Do not lose the flag on page migration. Ideally, these folios should be freed instead of migration. But it requires to find right spot do this and proper testing. Transfer the flag for now. Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> --- mm/migrate.c | 4 ++++ 1 file changed, 4 insertions(+)