Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] mm/migrate: batch PTE restoration for large folios
@ 2026-11-20  3:29 Wandun Chen
  2026-11-20  3:29 ` [PATCH 1/3] mm: factor out common softleaf offset PTE batch scanning Wandun Chen
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Wandun Chen @ 2026-11-20  3:29 UTC (permalink / raw)
  To: david, akpm, linux-mm, linux-kernel
  Cc: ljs, liam, vbabka, rppt, surenb, mhocko, ziy, matthew.brost,
	joshua.hahnjy, byungchul, gourry, ying.huang, apopple

From: Wandun Chen <chenwandun@lixiang.com>

remove_migration_pte() restores PTE-mapped large folios one PTE at a
time, constructing each new PTE and updating the folio references and
rmap separately.

Following David Hildenbrand's suggestion [1], this series batches
adjacent migration entries with consecutive PFNs and matching type
and flags. When a batch restores the whole folio in an mlocked VMA,
the rmap helpers automatically mark the folio as mlocked. It also
extends pte-batching to device-private folios.

The series applies on top of the mlock tracking fix for PTE-mapped
large-folio migration [2].

[1] https://lore.kernel.org/lkml/5f9c449e-43b3-4732-9c14-8199418cace0@kernel.org/
[2] https://lore.kernel.org/lkml/20261113083927.2727599-1-chenwandun1@gmail.com/

Wandun Chen (3):
  mm: factor out common softleaf offset PTE batch scanning
  mm/migrate: batch PTE restoration in remove_migration_pte()
  mm/migrate: batch PTE restoration for device-private folios

 mm/internal.h | 28 ++++++++++++++++++++--------
 mm/migrate.c  | 51 +++++++++++++++++++++++++++++++++++++++++++++------
 2 files changed, 65 insertions(+), 14 deletions(-)

-- 
2.43.0



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-11-20 15:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-20  3:29 [PATCH 0/3] mm/migrate: batch PTE restoration for large folios Wandun Chen
2026-11-20  3:29 ` [PATCH 1/3] mm: factor out common softleaf offset PTE batch scanning Wandun Chen
2026-11-20 15:34   ` Lorenzo Stoakes (ARM)
2026-11-20  3:29 ` [PATCH 2/3] mm/migrate: batch PTE restoration in remove_migration_pte() Wandun Chen
2026-11-20 15:22   ` Lorenzo Stoakes (ARM)
2026-11-20  3:29 ` [PATCH 3/3] mm/migrate: batch PTE restoration for device-private folios Wandun Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox