[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 07/10] migration: Add migration_rp_wait|kick()
|
From: |
Peter Xu |
|
Subject: |
Re: [PATCH v3 07/10] migration: Add migration_rp_wait|kick() |
|
Date: |
Thu, 5 Oct 2023 16:47:48 -0400 |
On Thu, Oct 05, 2023 at 09:49:25AM +0200, Juan Quintela wrote:
> Peter Xu <peterx@redhat.com> wrote:
> > It's just a simple wrapper for rp_sem on either wait() or kick(), make it
> > even clearer on how it is used. Prepared to be used even for other things.
> >
> > Reviewed-by: Fabiano Rosas <farosas@suse.de>
> > Signed-off-by: Peter Xu <peterx@redhat.com>
>
> Reviewed-by: Juan Quintela <quintela@redhat.com>
>
> I agree with the idea, but I think that the problem is the name of the
> semaphore.
>
> > +void migration_rp_wait(MigrationState *s)
> > +{
> > + qemu_sem_wait(&s->rp_state.rp_sem);
>
> I am not sure if it would be better to have the wrappers or just rename
>
> If we rename the remaphore to migration_thread, this becomes:
>
> qemu_sem_wait(&s->rp_state.return_path_ready);
>
> qemu_sem_post(&s->rp_state.return_path_ready);
>
> Or something similar?
I'd prefer keeping a pair of helpers, but I'm open to other suggestions,
e.g. I can rename the sem at the same time, or have a better name just for
the helpers.
Thanks,
--
Peter Xu
- [PATCH v3 00/10] migration: Better error handling in rp thread, allow failures in recover, Peter Xu, 2023/10/04
- [PATCH v3 02/10] migration: Introduce migrate_has_error(), Peter Xu, 2023/10/04
- [PATCH v3 07/10] migration: Add migration_rp_wait|kick(), Peter Xu, 2023/10/04
- [PATCH v3 05/10] qemufile: Always return a verbose error, Peter Xu, 2023/10/04
- [PATCH v3 06/10] migration: Remember num of ramblocks to sync during recovery, Peter Xu, 2023/10/04
- [PATCH v3 08/10] migration: Allow network to fail even during recovery, Peter Xu, 2023/10/04
- [PATCH v3 03/10] migration: Refactor error handling in source return path, Peter Xu, 2023/10/04