RE: [PATCH v1] migration: refactor migration_completion

2023-07-27 Thread Wang, Wei W
On Thursday, July 27, 2023 1:10 AM, Peter Xu wrote: > On Fri, Jul 21, 2023 at 11:14:55AM +, Wang, Wei W wrote: > > On Friday, July 21, 2023 4:38 AM, Peter Xu wrote: > > > Looks good to me, after addressing Isaku's comments. > > > > > > The current_active_state is very unfortunate, along with mo

Re: [PATCH v1] migration: refactor migration_completion

2023-07-26 Thread Peter Xu
On Fri, Jul 21, 2023 at 11:14:55AM +, Wang, Wei W wrote: > On Friday, July 21, 2023 4:38 AM, Peter Xu wrote: > > Looks good to me, after addressing Isaku's comments. > > > > The current_active_state is very unfortunate, along with most of the calls > > to > > migrate_set_state() - I bet most

RE: [PATCH v1] migration: refactor migration_completion

2023-07-21 Thread Wang, Wei W
On Friday, July 21, 2023 4:38 AM, Peter Xu wrote: > Looks good to me, after addressing Isaku's comments. > > The current_active_state is very unfortunate, along with most of the calls to > migrate_set_state() - I bet most of the code will definitely go wrong if that > cmpxchg didn't succeed inside

Re: [PATCH v1] migration: refactor migration_completion

2023-07-20 Thread Peter Xu
On Tue, Jul 18, 2023 at 01:25:12PM +, Wang, Wei W wrote: > On Tuesday, July 18, 2023 1:44 PM, Isaku Yamahata wrote: > > > --- a/migration/migration.c > > > +++ b/migration/migration.c > > > @@ -2058,6 +2058,21 @@ static int > > await_return_path_close_on_source(MigrationState *ms) > > > re

RE: [PATCH v1] migration: refactor migration_completion

2023-07-18 Thread Wang, Wei W
On Tuesday, July 18, 2023 1:44 PM, Isaku Yamahata wrote: > > --- a/migration/migration.c > > +++ b/migration/migration.c > > @@ -2058,6 +2058,21 @@ static int > await_return_path_close_on_source(MigrationState *ms) > > return ms->rp_state.error; > > } > > > > +static int close_return_path_on_

Re: [PATCH v1] migration: refactor migration_completion

2023-07-17 Thread Isaku Yamahata
On Fri, Jul 14, 2023 at 08:48:23PM +0800, Wei Wang wrote: > Current migration_completion function is a bit long. Refactor the long > implementation into different subfunctions: > - migration_completion_precopy: completion code related to precopy > - migration_completion_postcopy: completion code

[PATCH v1] migration: refactor migration_completion

2023-07-14 Thread Wei Wang
Current migration_completion function is a bit long. Refactor the long implementation into different subfunctions: - migration_completion_precopy: completion code related to precopy - migration_completion_postcopy: completion code related to postcopy - close_return_path_on_source: rp thread related