qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Fabiano Rosas <farosas@suse.de>, qemu-devel@nongnu.org
Cc: Peter Xu <peterx@redhat.com>,
	"Maciej S . Szmigiero" <mail@maciej.szmigiero.name>
Subject: Re: [PATCH v4 15/16] migration/multifd: Register nocomp ops dynamically
Date: Mon, 26 Aug 2024 08:32:08 +0200	[thread overview]
Message-ID: <c944fe50-1e59-4687-80a2-617ea3dbbced@linaro.org> (raw)
In-Reply-To: <20240823173911.6712-16-farosas@suse.de>

On 23/8/24 19:39, Fabiano Rosas wrote:
> Prior to moving the ram code into multifd-nocomp.c, change the code to
> register the nocomp ops dynamically so we don't need to have the ops
> structure defined in multifd.c.
> 
> While here, move the ops struct initialization to the end of the file
> to make the next diff cleaner.
> 
> Signed-off-by: Fabiano Rosas <farosas@suse.de>
> ---
>   migration/multifd.c | 32 +++++++++++++++++++-------------
>   1 file changed, 19 insertions(+), 13 deletions(-)


> +static MultiFDMethods multifd_nocomp_ops = {

As a follow up cleanup, have multifd_register_ops() take a
const MultiFDMethods*, making these arrays also const.

> +    .send_setup = multifd_nocomp_send_setup,
> +    .send_cleanup = multifd_nocomp_send_cleanup,
> +    .send_prepare = multifd_nocomp_send_prepare,
> +    .recv_setup = multifd_nocomp_recv_setup,
> +    .recv_cleanup = multifd_nocomp_recv_cleanup,
> +    .recv = multifd_nocomp_recv
> +};
> +
> +static void multifd_nocomp_register(void)
> +{
> +    multifd_register_ops(MULTIFD_COMPRESSION_NONE, &multifd_nocomp_ops);
> +}
> +
> +migration_init(multifd_nocomp_register);



  reply	other threads:[~2024-08-26  6:33 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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é [this message]
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

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=c944fe50-1e59-4687-80a2-617ea3dbbced@linaro.org \
    --to=philmd@linaro.org \
    --cc=farosas@suse.de \
    --cc=mail@maciej.szmigiero.name \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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;
as well as URLs for NNTP newsgroup(s).