[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 11:21:31 +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 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?
Later, Juan.
[Qemu-devel] [PATCH 03/11] migration: remove "enable_colo" var, Peter Xu, 2018/01/03
[Qemu-devel] [PATCH 05/11] migration: move vm_old_running into global state, Peter Xu, 2018/01/03