Re: [PATCH 04/14] migration/multifd: Postpone reset of MultiFDPages_t

2024-02-02 Thread Fabiano Rosas
Peter Xu writes: > On Fri, Feb 02, 2024 at 08:28:47AM +0800, Peter Xu wrote: >> > Pages allocated is nonsense. See if you agree with its removal: >> > https://gitlab.com/farosas/qemu/-/commit/7cfff1a3e31b271e901a6c08d8b5d8c01b680e4d >> > >> > --- >> > From 7cfff1a3e31b271e901a6c08d8b5d8c01b680e4

Re: [PATCH 04/14] migration/multifd: Postpone reset of MultiFDPages_t

2024-02-01 Thread Peter Xu
On Fri, Feb 02, 2024 at 08:28:47AM +0800, Peter Xu wrote: > > Pages allocated is nonsense. See if you agree with its removal: > > https://gitlab.com/farosas/qemu/-/commit/7cfff1a3e31b271e901a6c08d8b5d8c01b680e4d > > > > --- > > From 7cfff1a3e31b271e901a6c08d8b5d8c01b680e4d Mon Sep 17 00:00:00 2001

Re: [PATCH 04/14] migration/multifd: Postpone reset of MultiFDPages_t

2024-02-01 Thread Peter Xu
On Thu, Feb 01, 2024 at 12:21:27PM -0300, Fabiano Rosas wrote: > Peter Xu writes: > > > On Wed, Jan 31, 2024 at 12:27:51PM -0300, Fabiano Rosas wrote: > >> > +/* Reset a MultiFDPages_t* object for the next use */ > >> > +static void multifd_pages_reset(MultiFDPages_t *pages) > >> > +{ > >> > +

Re: [PATCH 04/14] migration/multifd: Postpone reset of MultiFDPages_t

2024-02-01 Thread Fabiano Rosas
Peter Xu writes: > On Wed, Jan 31, 2024 at 12:27:51PM -0300, Fabiano Rosas wrote: >> > +/* Reset a MultiFDPages_t* object for the next use */ >> > +static void multifd_pages_reset(MultiFDPages_t *pages) >> > +{ >> > +/* >> > + * We don't need to touch offset[] array, because it will be >>

Re: [PATCH 04/14] migration/multifd: Postpone reset of MultiFDPages_t

2024-02-01 Thread Peter Xu
On Wed, Jan 31, 2024 at 12:27:51PM -0300, Fabiano Rosas wrote: > > +/* Reset a MultiFDPages_t* object for the next use */ > > +static void multifd_pages_reset(MultiFDPages_t *pages) > > +{ > > +/* > > + * We don't need to touch offset[] array, because it will be > > + * overwritten late

Re: [PATCH 04/14] migration/multifd: Postpone reset of MultiFDPages_t

2024-01-31 Thread Fabiano Rosas
pet...@redhat.com writes: > From: Peter Xu > > Now we reset MultiFDPages_t object in the multifd sender thread in the > middle of the sending job. That's not necessary, because the "*pages" > struct will not be reused anyway until pending_job is cleared. > > Move that to the end after the job is

[PATCH 04/14] migration/multifd: Postpone reset of MultiFDPages_t

2024-01-31 Thread peterx
From: Peter Xu Now we reset MultiFDPages_t object in the multifd sender thread in the middle of the sending job. That's not necessary, because the "*pages" struct will not be reused anyway until pending_job is cleared. Move that to the end after the job is completed, provide a helper to reset a