All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] migration/postcopy: Preparatory refactoring for fast snapshot load
@ 2026-03-30 19:04 Takeru Hayasaka
  2026-03-30 19:04 ` [PATCH 1/3] migration/postcopy: Extract page fault handler callback Takeru Hayasaka
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Takeru Hayasaka @ 2026-03-30 19:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Xu, Fabiano Rosas, Takeru Hayasaka

This series refactors postcopy and mapped-ram code to make the
userfaultfd infrastructure reusable beyond postcopy live migration.
The goal is to prepare for fast snapshot load, which will use
userfaultfd to load guest RAM pages on demand from a snapshot file
instead of reading all pages before starting the VM.

All three patches are pure refactoring with no functional change.

Patch 1 introduces a callback for the fault thread's page request
handler, so the page supply mechanism can be swapped (network for
postcopy, local file for snapshot load).

Patch 2 extracts generic uffd setup (open, register, fault thread,
temp pages) from postcopy_ram_incoming_setup() into a shared
uffd_setup_incoming() function.

Patch 3 splits parse_ramblock_mapped_ram() so that the header and
bitmap can be read without immediately loading all page data. This
allows a future caller to read only the metadata and defer page
loading to a fault handler.

Tested with mapped-ram precopy file migration tests. Postcopy tests
require userfaultfd, which was not available in my test environment,
but no postcopy logic was changed.

This work is part of my preparation for the GSoC 2026 "Fast Snapshot
Load" project.

Signed-off-by: Takeru Hayasaka <hayatake396@gmail.com>
---
Takeru Hayasaka (3):
      migration/postcopy: Extract page fault handler callback
      migration/postcopy: Factor out uffd_setup_incoming() from postcopy setup
      migration/ram: Split mapped-ram header and page loading

 migration/migration.h    |  5 +++
 migration/postcopy-ram.c | 86 +++++++++++++++++++++++++++++++++++-------------
 migration/postcopy-ram.h | 27 +++++++++++++++
 migration/ram.c          | 52 +++++++++++++++++++++++++----
 4 files changed, 142 insertions(+), 28 deletions(-)
---
base-commit: 8e711856d7639cbffa51405f2cc2366e3d9e3a23
change-id: 20260327-fast-snapshot-refactor-3c6bb472b777

Best regards,
--  
Takeru Hayasaka <hayatake396@gmail.com>



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

end of thread, other threads:[~2026-03-31  2:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-30 19:04 [PATCH 0/3] migration/postcopy: Preparatory refactoring for fast snapshot load Takeru Hayasaka
2026-03-30 19:04 ` [PATCH 1/3] migration/postcopy: Extract page fault handler callback Takeru Hayasaka
2026-03-30 19:04 ` [PATCH 2/3] migration/postcopy: Factor out uffd_setup_incoming() from postcopy setup Takeru Hayasaka
2026-03-30 19:04 ` [PATCH 3/3] migration/ram: Split mapped-ram header and page loading Takeru Hayasaka
2026-03-30 20:16 ` [PATCH 0/3] migration/postcopy: Preparatory refactoring for fast snapshot load Peter Xu
2026-03-31  2:12   ` Takeru Hayasaka

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.