mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Wandun Chen <chenwandun1@gmail.com>
To: david@kernel.org, akpm@linux-foundation.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Cc: ljs@kernel.org, liam@infradead.org, vbabka@kernel.org,
	rppt@kernel.org, surenb@google.com, mhocko@suse.com,
	ziy@nvidia.com, matthew.brost@intel.com, joshua.hahnjy@gmail.com,
	byungchul@sk.com, gourry@gourry.net,
	ying.huang@linux.alibaba.com, apopple@nvidia.com
Subject: [PATCH 0/3] mm/migrate: batch PTE restoration for large folios
Date: Fri, 20 Nov 2026 11:29:46 +0800	[thread overview]
Message-ID: <20261120032949.2036731-1-chenwandun1@gmail.com> (raw)

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


             reply	other threads:[~2026-11-20  3:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-20  3:29 Wandun Chen [this message]
2026-11-20  3:29 ` [PATCH 1/3] mm: factor out common softleaf offset PTE batch scanning Wandun Chen
2026-11-20  3:29 ` [PATCH 2/3] mm/migrate: batch PTE restoration in remove_migration_pte() Wandun Chen
2026-11-20  3:29 ` [PATCH 3/3] mm/migrate: batch PTE restoration for device-private folios Wandun Chen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261120032949.2036731-1-chenwandun1@gmail.com \
    --to=chenwandun1@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=apopple@nvidia.com \
    --cc=byungchul@sk.com \
    --cc=david@kernel.org \
    --cc=gourry@gourry.net \
    --cc=joshua.hahnjy@gmail.com \
    --cc=liam@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ljs@kernel.org \
    --cc=matthew.brost@intel.com \
    --cc=mhocko@suse.com \
    --cc=rppt@kernel.org \
    --cc=surenb@google.com \
    --cc=vbabka@kernel.org \
    --cc=ying.huang@linux.alibaba.com \
    --cc=ziy@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®