All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/20] migration: Postcopy Preemption
@ 2022-02-16  6:27 Peter Xu
  2022-02-16  6:27 ` [PATCH 01/20] migration: Dump sub-cmd name in loadvm_process_command tp Peter Xu
                   ` (20 more replies)
  0 siblings, 21 replies; 54+ messages in thread
From: Peter Xu @ 2022-02-16  6:27 UTC (permalink / raw)
  To: qemu-devel
  Cc: Leonardo Bras Soares Passos, Dr . David Alan Gilbert, peterx,
	Juan Quintela

This is v1 of postcopy preempt series.  It can also be found here:

  https://github.com/xzpeter/qemu/tree/postcopy-preempt

This series added a new migration capability called "postcopy-preempt".  It can
be enabled when postcopy is enabled, and it'll simply (but greatly) speed up
postcopy page requests handling process.

  |----------------+--------------+-----------------------|
  | Host page size | Vanilla (ms) | Postcopy Preempt (ms) |
  |----------------+--------------+-----------------------|
  | 2M             |        10.58 |                  4.96 |
  | 4K             |        10.68 |                  0.57 |
  |----------------+--------------+-----------------------|

The major change since RFC is:

  - The very large patch is split into smaller ones
  - Added postcopy recovery support, and its unit test

The RFC series actually broke postcopy recovery on huge pages, and this version
will also have that issue fixed.

Just a quick note: this series is partly preparing for the doublemap support
too in the future.  The channel separation speedup will be beneficial for both
current postcopy or when doublemap is ready.  The huge page preemption part may
only benefit current postcopy, and it won't be enabled in the future doublemap
support because in that new doublemap world there will have no huge pages at
all being mapped.

The new patch layout:

Patch 1-3: Three leftover patches from patchset "[PATCH v3 0/8] migration:
Postcopy cleanup on ram disgard" that I picked up here too.

  https://lore.kernel.org/qemu-devel/20211224065000.97572-1-peterx@redhat.com/

  migration: Dump sub-cmd name in loadvm_process_command tp
  migration: Finer grained tracepoints for POSTCOPY_LISTEN
  migration: Tracepoint change in postcopy-run bottom half

Patch 4-9: Original postcopy preempt RFC preparation patches (with slight
modifications).

  migration: Introduce postcopy channels on dest node
  migration: Dump ramblock and offset too when non-same-page detected
  migration: Add postcopy_thread_create()
  migration: Move static var in ram_block_from_stream() into global
  migration: Add pss.postcopy_requested status
  migration: Move migrate_allow_multifd and helpers into migration.c

Patch 10-15: Some newly added patches when working on postcopy recovery
support.  After these patches migrate-recover command will allow re-entrance,
which is a very nice side effect.

  migration: Enlarge postcopy recovery to capture !-EIO too
  migration: postcopy_pause_fault_thread() never fails
  migration: Export ram_load_postcopy()
  migration: Move channel setup out of postcopy_try_recover()
  migration: Add migration_incoming_transport_cleanup()
  migration: Allow migrate-recover to run multiple times

Patch 16-19: The major work of postcopy preemption implementation is split into
four patches as suggested by Dave.

  migration: Add postcopy-preempt capability
  migration: Postcopy preemption preparation on channel creation
  migration: Postcopy preemption enablement
  migration: Postcopy recover with preempt enabled

Patch 20: the test case.

  tests: Add postcopy preempt test

For more information, feel free to refer to the RFC series cover letter:

  https://lore.kernel.org/qemu-devel/20220119080929.39485-1-peterx@redhat.com/

Please review, thanks.

Peter Xu (20):
  migration: Dump sub-cmd name in loadvm_process_command tp
  migration: Finer grained tracepoints for POSTCOPY_LISTEN
  migration: Tracepoint change in postcopy-run bottom half
  migration: Introduce postcopy channels on dest node
  migration: Dump ramblock and offset too when non-same-page detected
  migration: Add postcopy_thread_create()
  migration: Move static var in ram_block_from_stream() into global
  migration: Add pss.postcopy_requested status
  migration: Move migrate_allow_multifd and helpers into migration.c
  migration: Enlarge postcopy recovery to capture !-EIO too
  migration: postcopy_pause_fault_thread() never fails
  migration: Export ram_load_postcopy()
  migration: Move channel setup out of postcopy_try_recover()
  migration: Add migration_incoming_transport_cleanup()
  migration: Allow migrate-recover to run multiple times
  migration: Add postcopy-preempt capability
  migration: Postcopy preemption preparation on channel creation
  migration: Postcopy preemption enablement
  migration: Postcopy recover with preempt enabled
  tests: Add postcopy preempt test

 migration/migration.c        | 184 +++++++++++++++-----
 migration/migration.h        |  64 ++++++-
 migration/multifd.c          |  19 +--
 migration/multifd.h          |   2 -
 migration/postcopy-ram.c     | 208 ++++++++++++++++++-----
 migration/postcopy-ram.h     |  14 ++
 migration/ram.c              | 320 +++++++++++++++++++++++++++++++----
 migration/ram.h              |   3 +
 migration/savevm.c           |  66 ++++++--
 migration/socket.c           |  22 ++-
 migration/socket.h           |   1 +
 migration/trace-events       |  19 ++-
 qapi/migration.json          |   8 +-
 tests/qtest/migration-test.c |  39 ++++-
 14 files changed, 803 insertions(+), 166 deletions(-)

-- 
2.32.0



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

end of thread, other threads:[~2022-03-02  6:47 UTC | newest]

Thread overview: 54+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-16  6:27 [PATCH 00/20] migration: Postcopy Preemption Peter Xu
2022-02-16  6:27 ` [PATCH 01/20] migration: Dump sub-cmd name in loadvm_process_command tp Peter Xu
2022-02-16 15:42   ` Dr. David Alan Gilbert
2022-02-16  6:27 ` [PATCH 02/20] migration: Finer grained tracepoints for POSTCOPY_LISTEN Peter Xu
2022-02-16 15:43   ` Dr. David Alan Gilbert
2022-02-16  6:27 ` [PATCH 03/20] migration: Tracepoint change in postcopy-run bottom half Peter Xu
2022-02-16 19:00   ` Dr. David Alan Gilbert
2022-02-16  6:27 ` [PATCH 04/20] migration: Introduce postcopy channels on dest node Peter Xu
2022-02-21 15:49   ` Dr. David Alan Gilbert
2022-02-16  6:27 ` [PATCH 05/20] migration: Dump ramblock and offset too when non-same-page detected Peter Xu
2022-02-16  6:27 ` [PATCH 06/20] migration: Add postcopy_thread_create() Peter Xu
2022-02-21 16:00   ` Dr. David Alan Gilbert
2022-02-16  6:27 ` [PATCH 07/20] migration: Move static var in ram_block_from_stream() into global Peter Xu
2022-02-16  6:27 ` [PATCH 08/20] migration: Add pss.postcopy_requested status Peter Xu
2022-02-16  6:27 ` [PATCH 09/20] migration: Move migrate_allow_multifd and helpers into migration.c Peter Xu
2022-02-16  6:27 ` [PATCH 10/20] migration: Enlarge postcopy recovery to capture !-EIO too Peter Xu
2022-02-21 16:15   ` Dr. David Alan Gilbert
2022-02-16  6:28 ` [PATCH 11/20] migration: postcopy_pause_fault_thread() never fails Peter Xu
2022-02-21 16:16   ` Dr. David Alan Gilbert
2022-02-16  6:28 ` [PATCH 12/20] migration: Export ram_load_postcopy() Peter Xu
2022-02-21 16:17   ` Dr. David Alan Gilbert
2022-02-16  6:28 ` [PATCH 13/20] migration: Move channel setup out of postcopy_try_recover() Peter Xu
2022-02-22 10:57   ` Dr. David Alan Gilbert
2022-02-23  6:40     ` Peter Xu
2022-02-23  9:47       ` Dr. David Alan Gilbert
2022-02-23 12:55         ` Peter Xu
2022-02-16  6:28 ` [PATCH 14/20] migration: Add migration_incoming_transport_cleanup() Peter Xu
2022-02-21 16:56   ` Dr. David Alan Gilbert
2022-02-16  6:28 ` [PATCH 15/20] migration: Allow migrate-recover to run multiple times Peter Xu
2022-02-21 17:03   ` Dr. David Alan Gilbert
2022-02-22  2:51     ` Peter Xu
2022-02-16  6:28 ` [PATCH 16/20] migration: Add postcopy-preempt capability Peter Xu
2022-02-16  6:28 ` [PATCH 17/20] migration: Postcopy preemption preparation on channel creation Peter Xu
2022-02-21 18:39   ` Dr. David Alan Gilbert
2022-02-22  8:34     ` Peter Xu
2022-02-22 10:19       ` Dr. David Alan Gilbert
2022-02-16  6:28 ` [PATCH 18/20] migration: Postcopy preemption enablement Peter Xu
2022-02-22 10:52   ` Dr. David Alan Gilbert
2022-02-23  7:01     ` Peter Xu
2022-02-23  9:56       ` Dr. David Alan Gilbert
2022-02-23 13:05         ` Peter Xu
2022-02-16  6:28 ` [PATCH 19/20] migration: Postcopy recover with preempt enabled Peter Xu
2022-02-22 11:32   ` Dr. David Alan Gilbert
2022-02-23  7:45     ` Peter Xu
2022-02-23  9:52       ` Dr. David Alan Gilbert
2022-02-23 13:14         ` Peter Xu
2022-02-23 18:53           ` Dr. David Alan Gilbert
2022-02-16  6:28 ` [PATCH 20/20] tests: Add postcopy preempt test Peter Xu
2022-02-22 12:51   ` Dr. David Alan Gilbert
2022-02-23  7:50     ` Peter Xu
2022-03-01  5:34       ` Peter Xu
2022-03-01 17:00         ` Dr. David Alan Gilbert
2022-03-02  6:41           ` Peter Xu
2022-02-16  9:28 ` [PATCH 00/20] migration: Postcopy Preemption Peter Xu

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.