All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: Fabiano Rosas <farosas@suse.de>
Cc: qemu-devel@nongnu.org,
	Alexander Mikhalitsyn <alexander@mihalicyn.com>,
	Juraj Marcin <jmarcin@redhat.com>
Subject: Re: [RFC PATCH v1 00/17] migration: vmstate_save|load changes for peterx
Date: Thu, 26 Mar 2026 15:42:51 -0400	[thread overview]
Message-ID: <acWMO4KZli736zEP@x1.local> (raw)
In-Reply-To: <87mrzvk6us.fsf@suse.de>

On Wed, Mar 25, 2026 at 05:10:51PM -0300, Fabiano Rosas wrote:
> Sure, if there's anything you still find valuable but won't take for the
> repost let me know and I can send a separate series on top if that's the
> case.

I found that there're quite a few cleanups at latter patches, and it caused
some rebase pain if the base series still need frequent update.

So even if they look good in general to me, I want to leave them for later,
reducing scope of dependency.  After the API conslidated, we can do
cleanups on top.

Let me mention what I did and plan to post later:

> >>   vmstate: fixup the use of AUTO_ALLOC flag
> >>   vmstate: Remove vmstate_use_marker_field

I squashed these two.

> >>   vmstate: Stop checking size for nullptr compression

Picked.

> >>   vmstate: Set error inside of vmstate_save_field_with_vmdesc

Squashed.

> >>   vmstate: Remove vmdesc_loop

Starting from this one, I feel a bit uncertain, and maybe we can leave it
for later.

> >>   vmstate: Put array of pointers code together

This is a major cleanup, I left it and a few ones later aside for now.

> >>   vmstate: Create and save ptr marker in same function
> >>   vmstate: Don't recompute size and n_elems in vmstate_size
> >>   vmstate: Increase scope of vmstate_handle_alloc
> >>   vmstate: Remove curr_elem_p

I agree this is good, and..

> >>   vmstate: Introduce vmstate_first
> >>   vmstate: Introduce vmstate_next

.. despite that I feel like the current vmstate_next() impl might be
problematic (see my other reply), I also like this idea of having a _next
helper to hide some details on the ptr markers.  I'll adopt that idea,
thanks.

> >>   vmstate: Drop VMS_ARRAY_OF_POINTER_AUTO_ALLOC

Until I get corrected I think we'll need this flag, as said.  I feel like
it's better to keep VMS_ALLOC semantics as before (when set, it must alloc
the top field object ignoring stream data), then this one for the array
elements separate (meanwhile, this one is "optionally done", based on the
stream data).

We have plenty of space for VMS_* flags and it's not ABI.  IMHO when we're
not certain to merge flags we can always keep them separate until later too.

> >>   vmstate: Move VMS_MUST_EXIST check
> >>   vmstate: Invert exists check
> >>   vmstate: Declare variables at the top
> >>   vmstate: Reduce indentation levels

All these seem to be cleanups.  I plan to leave them separately.

I think it might be good I send another version directly, I'll do it very
soon and keep it RFC.  If I missed something while reading this series,
please then let me know.

-- 
Peter Xu



      reply	other threads:[~2026-03-26 19:43 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-24 19:43 [RFC PATCH v1 00/17] migration: vmstate_save|load changes for peterx Fabiano Rosas
2026-03-24 19:43 ` [RFC PATCH v1 01/17] vmstate: fixup the use of AUTO_ALLOC flag Fabiano Rosas
2026-03-25 16:18   ` Peter Xu
2026-03-24 19:43 ` [RFC PATCH v1 02/17] vmstate: Remove vmstate_use_marker_field Fabiano Rosas
2026-03-25 16:37   ` Peter Xu
2026-03-25 17:51     ` Fabiano Rosas
2026-03-24 19:43 ` [RFC PATCH v1 03/17] vmstate: Stop checking size for nullptr compression Fabiano Rosas
2026-03-24 19:43 ` [RFC PATCH v1 04/17] vmstate: Set error inside of vmstate_save_field_with_vmdesc Fabiano Rosas
2026-03-24 19:43 ` [RFC PATCH v1 05/17] vmstate: Remove vmdesc_loop Fabiano Rosas
2026-03-25 17:07   ` Peter Xu
2026-03-25 18:11     ` Fabiano Rosas
2026-03-25 21:43       ` Peter Xu
2026-03-24 19:43 ` [RFC PATCH v1 06/17] vmstate: Put array of pointers code together Fabiano Rosas
2026-03-24 19:43 ` [RFC PATCH v1 07/17] vmstate: Create and save ptr marker in same function Fabiano Rosas
2026-03-24 19:43 ` [RFC PATCH v1 08/17] vmstate: Don't recompute size and n_elems in vmstate_size Fabiano Rosas
2026-03-24 19:43 ` [RFC PATCH v1 09/17] vmstate: Increase scope of vmstate_handle_alloc Fabiano Rosas
2026-03-24 19:43 ` [RFC PATCH v1 10/17] vmstate: Remove curr_elem_p Fabiano Rosas
2026-03-24 19:43 ` [RFC PATCH v1 11/17] vmstate: Introduce vmstate_first Fabiano Rosas
2026-03-24 19:43 ` [RFC PATCH v1 12/17] vmstate: Introduce vmstate_next Fabiano Rosas
2026-03-26 14:18   ` Peter Xu
2026-03-26 21:45     ` Fabiano Rosas
2026-03-24 19:43 ` [RFC PATCH v1 13/17] vmstate: Drop VMS_ARRAY_OF_POINTER_AUTO_ALLOC Fabiano Rosas
2026-03-25 19:29   ` Peter Xu
2026-03-25 21:49     ` Peter Xu
2026-03-25 21:57   ` Peter Xu
2026-03-24 19:43 ` [RFC PATCH v1 14/17] vmstate: Move VMS_MUST_EXIST check Fabiano Rosas
2026-03-25 19:38   ` Peter Xu
2026-03-24 19:43 ` [RFC PATCH v1 15/17] vmstate: Invert exists check Fabiano Rosas
2026-03-24 19:43 ` [RFC PATCH v1 16/17] vmstate: Declare variables at the top Fabiano Rosas
2026-03-24 19:43 ` [RFC PATCH v1 17/17] vmstate: Reduce indentation levels Fabiano Rosas
2026-03-25 19:43 ` [RFC PATCH v1 00/17] migration: vmstate_save|load changes for peterx Peter Xu
2026-03-25 20:10   ` Fabiano Rosas
2026-03-26 19:42     ` Peter Xu [this message]

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=acWMO4KZli736zEP@x1.local \
    --to=peterx@redhat.com \
    --cc=alexander@mihalicyn.com \
    --cc=farosas@suse.de \
    --cc=jmarcin@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 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.