qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 02/11] migration: qemu_savevm_state_cleanup() in


From: Juan Quintela
Subject: Re: [Qemu-devel] [PATCH 02/11] migration: qemu_savevm_state_cleanup() in cleanup
Date: Wed, 03 Jan 2018 12:18:54 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Peter Xu <address@hidden> wrote:
> On Wed, Jan 03, 2018 at 11:21:31AM +0100, Juan Quintela wrote:
>> Peter Xu <address@hidden> wrote:
>> > On Wed, Jan 03, 2018 at 10:15:41AM +0100, Juan Quintela wrote:
>> >> Peter Xu <address@hidden> wrote:
>> >> > Moving existing callers all into migrate_fd_cleanup().  It simplifies
>> >> > migration_thread() a bit.
>> >> >
>> >> > Signed-off-by: Peter Xu <address@hidden>
>> >> 
>> >> Reviewed-by: Juan Quintela <address@hidden>
>> >
>> > Thanks.
>> >
>> >> 
>> >> I am trying to see if we can call migrate_fd_cleanup() twice.  As far as
>> >> I can see, we are not doing it.  But, and it is a big but, we are not
>> >> checking that we are not calling qemu_savevm_state_cleanup() twice.  If
>> >> that happens, we can get double frees and similar.
>> >> 
>> >> I put the reviewed-by anyways, because I *think* that we are doing it
>> >> right now, and otherwise, we should make sure that we are not calling it
>> >> twice, not papering over it.
>> >> 
>> >> Once here, I have notice that we call block_cleanup_parameters() in
>> >> *three* places.  We call notifier_list_notify() on two of this places (I
>> >> can't see any good reason *why* we don't call the notifier for
>> >> migrate_fd_cancel).
>> >
>> > Indeed.
>> >
>> > IMHO we can remove two calls of block_cleanup_parameters(), only keep
>> > the one in migrate_fd_cleanup(), and remove on notifier_list_notify()
>> > in migrate_fd_error() (these can be two more patches).  What do you
>> > think?
>> 
>> I think we need to make sure that we have a function that we always
>> call at the end.  I think that we have that on migration_fd_cleanup(),
>> so put everything there should be ok, no?
>
> IMHO that's exactly what I mean, no? :)
>
> For notifier_list_notify(), it's different - I just remove the extra
> one in migrate_fd_error() because it'll be called in
> migrate_fd_cleanup() as well, which is a duplicate.

then what call the one when we do a cancel?  the one in cleanup also?

Thanks, Juan.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]