Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

docs/mm: convert from "Non-LRU page migration" to "movable_ops page migration"

Let's bring the docs up-to-date.

Link: https://lkml.kernel.org/r/20250704102524.326966-28-david@redhat.com
Signed-off-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Zi Yan <ziy@nvidia.com>
Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Reviewed-by: Harry Yoo <harry.yoo@oracle.com>
Cc: Alistair Popple <apopple@nvidia.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Brendan Jackman <jackmanb@google.com>
Cc: Byungchul Park <byungchul@sk.com>
Cc: Chengming Zhou <chengming.zhou@linux.dev>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Eugenio Pé rez <eperezma@redhat.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Gregory Price <gourry@gourry.net>
Cc: "Huang, Ying" <ying.huang@linux.alibaba.com>
Cc: Jan Kara <jack@suse.cz>
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Jason Wang <jasowang@redhat.com>
Cc: Jerrin Shaji George <jerrin.shaji-george@broadcom.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: John Hubbard <jhubbard@nvidia.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Joshua Hahn <joshua.hahnjy@gmail.com>
Cc: Liam Howlett <liam.howlett@oracle.com>
Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
Cc: Mathew Brost <matthew.brost@intel.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Miaohe Lin <linmiaohe@huawei.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Naoya Horiguchi <nao.horiguchi@gmail.com>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Peter Xu <peterx@redhat.com>
Cc: Qi Zheng <zhengqi.arch@bytedance.com>
Cc: Rakie Kim <rakie.kim@sk.com>
Cc: Rik van Riel <riel@surriel.com>
Cc: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Shakeel Butt <shakeel.butt@linux.dev>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Cc: xu xin <xu.xin16@zte.com.cn>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

David Hildenbrand and committed by
Andrew Morton
677e0e35 df25569d

+25 -10
+25 -10
Documentation/mm/page_migration.rst
··· 146 146 18. The new page is moved to the LRU and can be scanned by the swapper, 147 147 etc. again. 148 148 149 - Non-LRU page migration 150 - ====================== 149 + movable_ops page migration 150 + ========================== 151 151 152 - Although migration originally aimed for reducing the latency of memory 153 - accesses for NUMA, compaction also uses migration to create high-order 154 - pages. For compaction purposes, it is also useful to be able to move 155 - non-LRU pages, such as zsmalloc and virtio-balloon pages. 152 + Selected typed, non-folio pages (e.g., pages inflated in a memory balloon, 153 + zsmalloc pages) can be migrated using the movable_ops migration framework. 156 154 157 - If a driver wants to make its pages movable, it should define a struct 158 - movable_operations. It then needs to call __SetPageMovable() on each 159 - page that it may be able to move. This uses the ``page->mapping`` field, 160 - so this field is not available for the driver to use for other purposes. 155 + The "struct movable_operations" provide callbacks specific to a page type 156 + for isolating, migrating and un-isolating (putback) these pages. 157 + 158 + Once a page is indicated as having movable_ops, that condition must not 159 + change until the page was freed back to the buddy. This includes not 160 + changing/clearing the page type and not changing/clearing the 161 + PG_movable_ops page flag. 162 + 163 + Arbitrary drivers cannot currently make use of this framework, as it 164 + requires: 165 + 166 + (a) a page type 167 + (b) indicating them as possibly having movable_ops in page_has_movable_ops() 168 + based on the page type 169 + (c) returning the movable_ops from page_movable_ops() based on the page 170 + type 171 + (d) not reusing the PG_movable_ops and PG_movable_ops_isolated page flags 172 + for other purposes 173 + 174 + For example, balloon drivers can make use of this framework through the 175 + balloon-compaction infrastructure residing in the core kernel. 161 176 162 177 Monitoring Migration 163 178 =====================