All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Dr . David Alan Gilbert" <dgilbert@redhat.com>,
	peterx@redhat.com, "Daniel P . Berrange" <berrange@redhat.com>,
	Juan Quintela <quintela@redhat.com>,
	ani@anisinha.ca,
	Leonardo Bras Soares Passos <lsoaresp@redhat.com>,
	Manish Mishra <manish.mishra@nutanix.com>
Subject: [PATCH v2 00/15] migration: Postcopy Preempt-Full
Date: Tue, 11 Oct 2022 17:55:44 -0400	[thread overview]
Message-ID: <20221011215559.602584-1-peterx@redhat.com> (raw)

Based-on: <20221004182430.97638-1-peterx@redhat.com>
  [PATCH v2 0/5] migration: Bug fixes (prepare for preempt-full)

Tree is here:
  https://github.com/xzpeter/qemu/tree/preempt-full

RFC: https://lore.kernel.org/r/20220829165659.96046-1-peterx@redhat.com
v1:  https://lore.kernel.org/r/20220920225106.48451-1-peterx@redhat.com

This patchset is v2 version of preempt-full series.

v2 changelog:
- Add r-bs
- Rename release_lock to preempt_active [Dave]
- Create MigrationAtomicStats structure, maintaining the 4 stats fields
  that may need atomic access since they'll be accessed by multiple
  threads. define them with Stat64.  Add rich comment. [Dave]
- One more patch added (patch 1) to fix another deadlock; not easy to
  reproduce but actually quite obvious..

The existing preempt code has reduced ramdom page req latency over 10Gbps
network from ~12ms to ~500us which has already landed.

This preempt-full series can further reduces that ~500us to ~230us per my
initial test.

Note that no new capability is needed, IOW it's fully compatible with the
existing preempt mode.  So the naming is actually not important but just to
identify the difference on the binaries.

The logic of the series is simple: send urgent pages in rp-return thread
rather than migration thread.  It also means rp-thread will take over the
ownership of the newly created preempt channel.  It can slow down rp-return
thread on receiving page requests, but I don't really see a major issue
with it so far but only benefits.

For detailed performance numbers, please refer to the rfc cover letter.

Please have a look, thanks.

Peter Xu (15):
  migration: Take bitmap mutex when completing ram migration
  migration: Add postcopy_preempt_active()
  migration: Cleanup xbzrle zero page cache update logic
  migration: Trivial cleanup save_page_header() on same block check
  migration: Remove RAMState.f references in compression code
  migration: Yield bitmap_mutex properly when sending/sleeping
  migration: Use atomic ops properly for page accountings
  migration: Teach PSS about host page
  migration: Introduce pss_channel
  migration: Add pss_init()
  migration: Make PageSearchStatus part of RAMState
  migration: Move last_sent_block into PageSearchStatus
  migration: Send requested page directly in rp-return thread
  migration: Remove old preempt code around state maintainance
  migration: Drop rs->f

 migration/migration.c |  47 +--
 migration/migration.h |   7 -
 migration/multifd.c   |   4 +-
 migration/ram.c       | 720 +++++++++++++++++++-----------------------
 migration/ram.h       |  20 ++
 5 files changed, 379 insertions(+), 419 deletions(-)

-- 
2.37.3



             reply	other threads:[~2022-10-11 22:06 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-11 21:55 Peter Xu [this message]
2022-10-11 21:55 ` [PATCH v2 01/15] migration: Take bitmap mutex when completing ram migration Peter Xu
2022-10-12 16:14   ` Dr. David Alan Gilbert
2022-11-14 15:06   ` Juan Quintela
2022-10-11 21:55 ` [PATCH v2 02/15] migration: Add postcopy_preempt_active() Peter Xu
2022-11-14 15:07   ` Juan Quintela
2022-10-11 21:55 ` [PATCH v2 03/15] migration: Cleanup xbzrle zero page cache update logic Peter Xu
2022-11-14 15:08   ` Juan Quintela
2022-10-11 21:55 ` [PATCH v2 04/15] migration: Trivial cleanup save_page_header() on same block check Peter Xu
2022-11-14 15:08   ` Juan Quintela
2022-10-11 21:55 ` [PATCH v2 05/15] migration: Remove RAMState.f references in compression code Peter Xu
2022-11-14 15:09   ` Juan Quintela
2022-10-11 21:55 ` [PATCH v2 06/15] migration: Yield bitmap_mutex properly when sending/sleeping Peter Xu
2022-10-12 16:43   ` Dr. David Alan Gilbert
2022-10-12 17:51     ` Peter Xu
2022-10-13 16:19       ` Peter Xu
2022-10-13 16:37         ` Dr. David Alan Gilbert
2022-11-15  9:19         ` Juan Quintela
2022-10-11 21:55 ` [PATCH v2 07/15] migration: Use atomic ops properly for page accountings Peter Xu
2022-11-14 15:14   ` Juan Quintela
2022-10-11 21:55 ` [PATCH v2 08/15] migration: Teach PSS about host page Peter Xu
2022-10-11 21:55 ` [PATCH v2 09/15] migration: Introduce pss_channel Peter Xu
2022-10-11 21:55 ` [PATCH v2 10/15] migration: Add pss_init() Peter Xu
2022-10-11 21:55 ` [PATCH v2 11/15] migration: Make PageSearchStatus part of RAMState Peter Xu
2022-10-11 21:55 ` [PATCH v2 12/15] migration: Move last_sent_block into PageSearchStatus Peter Xu
2022-11-14 15:19   ` Juan Quintela
2022-10-11 21:55 ` [PATCH v2 13/15] migration: Send requested page directly in rp-return thread Peter Xu
2022-10-11 21:55 ` [PATCH v2 14/15] migration: Remove old preempt code around state maintainance Peter Xu
2022-11-14 15:19   ` Juan Quintela
2022-10-11 21:55 ` [PATCH v2 15/15] migration: Drop rs->f Peter Xu
2022-11-14 15:18   ` Juan Quintela

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=20221011215559.602584-1-peterx@redhat.com \
    --to=peterx@redhat.com \
    --cc=ani@anisinha.ca \
    --cc=berrange@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=lsoaresp@redhat.com \
    --cc=manish.mishra@nutanix.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.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 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.