[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250618174014.1168640-1-david@redhat.com>
Date: Wed, 18 Jun 2025 19:39:43 +0200
From: David Hildenbrand <david@...hat.com>
To: linux-kernel@...r.kernel.org
Cc: linux-mm@...ck.org,
linux-doc@...r.kernel.org,
linuxppc-dev@...ts.ozlabs.org,
virtualization@...ts.linux.dev,
linux-fsdevel@...r.kernel.org,
David Hildenbrand <david@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Jonathan Corbet <corbet@....net>,
Madhavan Srinivasan <maddy@...ux.ibm.com>,
Michael Ellerman <mpe@...erman.id.au>,
Nicholas Piggin <npiggin@...il.com>,
Christophe Leroy <christophe.leroy@...roup.eu>,
Jerrin Shaji George <jerrin.shaji-george@...adcom.com>,
Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Michael S. Tsirkin" <mst@...hat.com>,
Jason Wang <jasowang@...hat.com>,
Xuan Zhuo <xuanzhuo@...ux.alibaba.com>,
Eugenio Pérez <eperezma@...hat.com>,
Alexander Viro <viro@...iv.linux.org.uk>,
Christian Brauner <brauner@...nel.org>,
Jan Kara <jack@...e.cz>,
Zi Yan <ziy@...dia.com>,
Matthew Brost <matthew.brost@...el.com>,
Joshua Hahn <joshua.hahnjy@...il.com>,
Rakie Kim <rakie.kim@...com>,
Byungchul Park <byungchul@...com>,
Gregory Price <gourry@...rry.net>,
Ying Huang <ying.huang@...ux.alibaba.com>,
Alistair Popple <apopple@...dia.com>,
Lorenzo Stoakes <lorenzo.stoakes@...cle.com>,
"Liam R. Howlett" <Liam.Howlett@...cle.com>,
Vlastimil Babka <vbabka@...e.cz>,
Mike Rapoport <rppt@...nel.org>,
Suren Baghdasaryan <surenb@...gle.com>,
Michal Hocko <mhocko@...e.com>,
"Matthew Wilcox (Oracle)" <willy@...radead.org>,
Minchan Kim <minchan@...nel.org>,
Sergey Senozhatsky <senozhatsky@...omium.org>,
Brendan Jackman <jackmanb@...gle.com>,
Johannes Weiner <hannes@...xchg.org>,
Jason Gunthorpe <jgg@...pe.ca>,
John Hubbard <jhubbard@...dia.com>,
Peter Xu <peterx@...hat.com>,
Xu Xin <xu.xin16@....com.cn>,
Chengming Zhou <chengming.zhou@...ux.dev>,
Miaohe Lin <linmiaohe@...wei.com>,
Naoya Horiguchi <nao.horiguchi@...il.com>,
Oscar Salvador <osalvador@...e.de>,
Rik van Riel <riel@...riel.com>,
Harry Yoo <harry.yoo@...cle.com>,
Qi Zheng <zhengqi.arch@...edance.com>,
Shakeel Butt <shakeel.butt@...ux.dev>
Subject: [PATCH RFC 00/29] mm/migration: rework movable_ops page migration (part 1)
Based on mm/mm-new.
In the future, as we decouple "struct page" from "struct folio", pages
that support "non-lru page migration" -- movable_ops page migration
such as memory balloons and zsmalloc -- will no longer be folios. They
will not have ->mapping, ->lru, and likely no refcount and no
page lock. But they will have flags :)
This is the first part (other parts not written yet) of decoupling
movable_ops page migration from folio migration.
In this series, we get rid of the ->mapping usage, and start cleaning up
the code + separating it from folio migration.
Migration core will have to be further reworked to not treat movable_ops
pages like folios. This is the first step into that direction.
RFC because I only did some light testing with virtio-balloon + zsmalloc
page migration, and have to polish some patch descriptions.
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Jonathan Corbet <corbet@....net>
Cc: Madhavan Srinivasan <maddy@...ux.ibm.com>
Cc: Michael Ellerman <mpe@...erman.id.au>
Cc: Nicholas Piggin <npiggin@...il.com>
Cc: Christophe Leroy <christophe.leroy@...roup.eu>
Cc: Jerrin Shaji George <jerrin.shaji-george@...adcom.com>
Cc: Arnd Bergmann <arnd@...db.de>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: "Michael S. Tsirkin" <mst@...hat.com>
Cc: David Hildenbrand <david@...hat.com>
Cc: Jason Wang <jasowang@...hat.com>
Cc: Xuan Zhuo <xuanzhuo@...ux.alibaba.com>
Cc: "Eugenio Pérez" <eperezma@...hat.com>
Cc: Alexander Viro <viro@...iv.linux.org.uk>
Cc: Christian Brauner <brauner@...nel.org>
Cc: Jan Kara <jack@...e.cz>
Cc: Zi Yan <ziy@...dia.com>
Cc: Matthew Brost <matthew.brost@...el.com>
Cc: Joshua Hahn <joshua.hahnjy@...il.com>
Cc: Rakie Kim <rakie.kim@...com>
Cc: Byungchul Park <byungchul@...com>
Cc: Gregory Price <gourry@...rry.net>
Cc: Ying Huang <ying.huang@...ux.alibaba.com>
Cc: Alistair Popple <apopple@...dia.com>
Cc: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
Cc: "Liam R. Howlett" <Liam.Howlett@...cle.com>
Cc: Vlastimil Babka <vbabka@...e.cz>
Cc: Mike Rapoport <rppt@...nel.org>
Cc: Suren Baghdasaryan <surenb@...gle.com>
Cc: Michal Hocko <mhocko@...e.com>
Cc: "Matthew Wilcox (Oracle)" <willy@...radead.org>
Cc: Minchan Kim <minchan@...nel.org>
Cc: Sergey Senozhatsky <senozhatsky@...omium.org>
Cc: Brendan Jackman <jackmanb@...gle.com>
Cc: Johannes Weiner <hannes@...xchg.org>
Cc: Jason Gunthorpe <jgg@...pe.ca>
Cc: John Hubbard <jhubbard@...dia.com>
Cc: Peter Xu <peterx@...hat.com>
Cc: Xu Xin <xu.xin16@....com.cn>
Cc: Chengming Zhou <chengming.zhou@...ux.dev>
Cc: Miaohe Lin <linmiaohe@...wei.com>
Cc: Naoya Horiguchi <nao.horiguchi@...il.com>
Cc: Oscar Salvador <osalvador@...e.de>
Cc: Rik van Riel <riel@...riel.com>
Cc: Harry Yoo <harry.yoo@...cle.com>
Cc: Qi Zheng <zhengqi.arch@...edance.com>
Cc: Shakeel Butt <shakeel.butt@...ux.dev>
David Hildenbrand (29):
mm/balloon_compaction: we cannot have isolated pages in the balloon
list
mm/balloon_compaction: convert balloon_page_delete() to
balloon_page_finalize()
mm/zsmalloc: drop PageIsolated() related VM_BUG_ONs
mm/page_alloc: allow for making page types sticky until freed
mm/balloon_compaction: make PageOffline sticky
mm/zsmalloc: make PageZsmalloc() sticky
mm/migrate: rename isolate_movable_page() to
isolate_movable_ops_page()
mm/migrate: rename putback_movable_folio() to
putback_movable_ops_page()
mm/migrate: factor out movable_ops page handling into
migrate_movable_ops_page()
mm/migrate: remove folio_test_movable() and folio_movable_ops()
mm/migrate: move movable_ops page handling out of move_to_new_folio()
mm/zsmalloc: stop using __ClearPageMovable()
mm/balloon_compaction: stop using __ClearPageMovable()
mm/migrate: remove __ClearPageMovable()
mm/migration: remove PageMovable()
mm: rename __PageMovable() to page_has_movable_ops()
mm/page_isolation: drop __folio_test_movable() check for large folios
mm: remove __folio_test_movable()
mm: stop storing migration_ops in page->mapping
mm: convert "movable" flag in page->mapping to a page flag
mm: rename PG_isolated to PG_movable_ops_isolated
mm/page-flags: rename PAGE_MAPPING_MOVABLE to PAGE_MAPPING_ANON_KSM
mm/page-alloc: remove PageMappingFlags()
mm/page-flags: remove folio_mapping_flags()
mm: simplify folio_expected_ref_count()
mm: rename PAGE_MAPPING_* to FOLIO_MAPPING_*
docs/mm: convert from "Non-LRU page migration" to "movable_ops page
migration"
mm/balloon_compaction: "movable_ops" doc updates
mm/balloon_compaction: provide single balloon_page_insert() and
balloon_mapping_gfp_mask()
Documentation/mm/page_migration.rst | 39 ++--
arch/powerpc/platforms/pseries/cmm.c | 2 +-
drivers/misc/vmw_balloon.c | 3 +-
drivers/virtio/virtio_balloon.c | 4 +-
fs/proc/page.c | 4 +-
include/linux/balloon_compaction.h | 90 ++++-----
include/linux/fs.h | 2 +-
include/linux/migrate.h | 42 +----
include/linux/mm.h | 4 +-
include/linux/mm_types.h | 1 -
include/linux/page-flags.h | 104 +++++++----
include/linux/pagemap.h | 2 +-
include/linux/zsmalloc.h | 2 +
mm/balloon_compaction.c | 21 ++-
mm/compaction.c | 44 +----
mm/gup.c | 4 +-
mm/internal.h | 2 +-
mm/ksm.c | 4 +-
mm/memory-failure.c | 4 +-
mm/memory_hotplug.c | 8 +-
mm/migrate.c | 269 +++++++++++++++------------
mm/page_alloc.c | 12 +-
mm/page_isolation.c | 12 +-
mm/rmap.c | 16 +-
mm/util.c | 6 +-
mm/vmscan.c | 6 +-
mm/zpdesc.h | 15 +-
mm/zsmalloc.c | 29 ++-
28 files changed, 361 insertions(+), 390 deletions(-)
base-commit: 21f39cc0346ea2081a83f0469995144d75d23075
--
2.49.0
Powered by blists - more mailing lists