qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 00/16] migration/multifd: Remove multifd_send_state->pages
@ 2024-08-23 17:38 Fabiano Rosas
  2024-08-23 17:38 ` [PATCH v4 01/16] migration/multifd: Reduce access to p->pages Fabiano Rosas
                   ` (15 more replies)
  0 siblings, 16 replies; 27+ messages in thread
From: Fabiano Rosas @ 2024-08-23 17:38 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Xu, Maciej S . Szmigiero

Hi,

Not much changed sinced v3, the most notable is that I kept the nocomp
names and created multifd-nocomp.c. I think "plain" is even more
misterious, so let's keep what we are already used to.

CI run: https://gitlab.com/farosas/qemu/-/pipelines/1425141484

v3:
https://lore.kernel.org/r/20240801123516.4498-1-farosas@suse.de

This v3 incorporates the suggestions done by Peter in v2. Aside from
those, of note:

- fixed the allocation of MultiFDSendData. The previous version didn't
  account for compiler-inserted holes;

- kept the packet split patch;

- added some patches to remove p->page_count, p->page_size,
  pages->allocated. These are all constants and don't need to be
  per-channel;

- moved the code into multifd-ram.c.

  However, I left the p->packet allocation (depends on page_count) and
  p->normal + p->zero behind because I need to see how the device
  state patches will deal with the packet stuff before I can come up
  with a way to move those out of the MultiFD*Params. It might not be
  worth it adding another struct just for the ram code to store
  p->normal, p->zero.

With this I'm pretty much done with what I think needs to be changed
as a prereq for the device state work. I don't have anything else in
mind to add to this series.

CI run: https://gitlab.com/farosas/qemu/-/pipelines/1395572680

v2:
https://lore.kernel.org/r/20240722175914.24022-1-farosas@suse.de

v1:
https://lore.kernel.org/r/20240620212111.29319-1-farosas@suse.de

First of all, apologies for the roughness of the series. I'm off for
the next couple of weeks and wanted to put something together early
for your consideration.

This series is a refactoring (based on an earlier, off-list
attempt[0]), aimed to remove the usage of the MultiFDPages_t type in
the multifd core. If we're going to add support for more data types to
multifd, we first need to clean that up.

This time around this work was prompted by Maciej's series[1]. I see
you're having to add a bunch of is_device_state checks to work around
the rigidity of the code.

Aside from the VFIO work, there is also the intent (coming back from
Juan's ideas) to make multifd the default code path for migration,
which will have to include the vmstate migration and anything else we
put on the stream via QEMUFile.

I have long since been bothered by having 'pages' sprinkled all over
the code, so I might be coming at this with a bit of a narrow focus,
but I believe in order to support more types of payloads in multifd,
we need to first allow the scheduling at multifd_send_pages() to be
independent of MultiFDPages_t. So here it is. Let me know what you
think.

(as I said, I'll be off for a couple of weeks, so feel free to
incorporate any of this code if it's useful. Or to ignore it
completely).

CI run: https://gitlab.com/farosas/qemu/-/pipelines/1340992028

0- https://github.com/farosas/qemu/commits/multifd-packet-cleanups/
1- https://lore.kernel.org/r/cover.1718717584.git.maciej.szmigiero@oracle.com

Fabiano Rosas (16):
  migration/multifd: Reduce access to p->pages
  migration/multifd: Inline page_size and page_count
  migration/multifd: Remove pages->allocated
  migration/multifd: Pass in MultiFDPages_t to file_write_ramblock_iov
  migration/multifd: Introduce MultiFDSendData
  migration/multifd: Make MultiFDPages_t:offset a flexible array member
  migration/multifd: Replace p->pages with an union pointer
  migration/multifd: Move pages accounting into
    multifd_send_zero_page_detect()
  migration/multifd: Remove total pages tracing
  migration/multifd: Isolate ram pages packet data
  migration/multifd: Don't send ram data during SYNC
  migration/multifd: Replace multifd_send_state->pages with client data
  migration/multifd: Allow multifd sync without flush
  migration/multifd: Standardize on multifd ops names
  migration/multifd: Register nocomp ops dynamically
  migration/multifd: Move nocomp code into multifd-nocomp.c

 migration/file.c              |   3 +-
 migration/file.h              |   2 +-
 migration/meson.build         |   1 +
 migration/multifd-nocomp.c    | 394 +++++++++++++++++++++++++
 migration/multifd-qpl.c       |  77 +----
 migration/multifd-uadk.c      | 100 ++-----
 migration/multifd-zero-page.c |  13 +-
 migration/multifd-zlib.c      |  97 ++-----
 migration/multifd-zstd.c      |  96 ++----
 migration/multifd.c           | 531 ++++++----------------------------
 migration/multifd.h           |  74 +++--
 migration/ram.c               |  10 +-
 migration/trace-events        |   9 +-
 13 files changed, 628 insertions(+), 779 deletions(-)
 create mode 100644 migration/multifd-nocomp.c

-- 
2.35.3



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

end of thread, other threads:[~2024-08-26 17:16 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-23 17:38 [PATCH v4 00/16] migration/multifd: Remove multifd_send_state->pages Fabiano Rosas
2024-08-23 17:38 ` [PATCH v4 01/16] migration/multifd: Reduce access to p->pages Fabiano Rosas
2024-08-23 17:38 ` [PATCH v4 02/16] migration/multifd: Inline page_size and page_count Fabiano Rosas
2024-08-23 17:38 ` [PATCH v4 03/16] migration/multifd: Remove pages->allocated Fabiano Rosas
2024-08-23 17:38 ` [PATCH v4 04/16] migration/multifd: Pass in MultiFDPages_t to file_write_ramblock_iov Fabiano Rosas
2024-08-23 17:39 ` [PATCH v4 05/16] migration/multifd: Introduce MultiFDSendData Fabiano Rosas
2024-08-23 17:39 ` [PATCH v4 06/16] migration/multifd: Make MultiFDPages_t:offset a flexible array member Fabiano Rosas
2024-08-23 17:39 ` [PATCH v4 07/16] migration/multifd: Replace p->pages with an union pointer Fabiano Rosas
2024-08-23 17:39 ` [PATCH v4 08/16] migration/multifd: Move pages accounting into multifd_send_zero_page_detect() Fabiano Rosas
2024-08-23 17:39 ` [PATCH v4 09/16] migration/multifd: Remove total pages tracing Fabiano Rosas
2024-08-26 15:53   ` Peter Xu
2024-08-23 17:39 ` [PATCH v4 10/16] migration/multifd: Isolate ram pages packet data Fabiano Rosas
2024-08-26  6:23   ` Philippe Mathieu-Daudé
2024-08-26 17:13     ` Fabiano Rosas
2024-08-26 16:06   ` Peter Xu
2024-08-23 17:39 ` [PATCH v4 11/16] migration/multifd: Don't send ram data during SYNC Fabiano Rosas
2024-08-23 17:39 ` [PATCH v4 12/16] migration/multifd: Replace multifd_send_state->pages with client data Fabiano Rosas
2024-08-23 17:39 ` [PATCH v4 13/16] migration/multifd: Allow multifd sync without flush Fabiano Rosas
2024-08-23 17:39 ` [PATCH v4 14/16] migration/multifd: Standardize on multifd ops names Fabiano Rosas
2024-08-26 16:14   ` Peter Xu
2024-08-26 17:16     ` Fabiano Rosas
2024-08-23 17:39 ` [PATCH v4 15/16] migration/multifd: Register nocomp ops dynamically Fabiano Rosas
2024-08-26  6:32   ` Philippe Mathieu-Daudé
2024-08-26 11:18   ` Prasad Pandit
2024-08-26 16:15   ` Peter Xu
2024-08-23 17:39 ` [PATCH v4 16/16] migration/multifd: Move nocomp code into multifd-nocomp.c Fabiano Rosas
2024-08-26 16:16   ` Peter Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).