qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v3 1/1] yank: Unregister function when using TLS migration


From: Peter Xu
Subject: Re: [PATCH v3 1/1] yank: Unregister function when using TLS migration
Date: Tue, 1 Jun 2021 12:04:57 -0400

On Tue, Jun 01, 2021 at 05:32:33PM +0200, Lukas Straub wrote:
> > I have one pure question not directly related to Leo's patch (probably for
> > Lukas?): we check OBJECT(ioc)->ref == 1 when unregister each function.  In 
> > what
> > case will the ref be not one?
> > 
> 
> If a return path is opened with qemu_file_get_return_path(), it will
> take additional references:
> 
> qemu_file_get_return_path() (qemu-file.c)
>  f->ops->get_return_path() -> channel_get_input_return_path() 
> (qemu-file-channel.c)
>   qemu_fopen_channel_input() (qemu-file-channel.c)
>    object_ref(OBJECT(ioc))

Makes sense.

Wondering whether it's better to unregister in migrate_fd_cleanup() rather than
channel_close(), as we used to register in migration code rather than in qemu
file wrapper layer.  I feel like we can drop the ref==1 check if we move, as
the return path should have been closed when reaching migrate_fd_cleanup()
(similar doubt to multifd_load_cleanup() calls to yank_unregister_function()).
No strong opinion, though..

Thanks,

-- 
Peter Xu




reply via email to

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