Hello Michael,

Thanks for your help!

I read the function of tcp_wait_for_connect(), there is a statement; "
qemu_set_fd_handler2(s->fd, NULL, NULL, NULL, NULL); " I guess this will
disable this file-descriptor from the main loop and make the current
execution parallel with the main loop. Is it correct?

Also, I did not find any thread_create related function in the
migrate_fd_connect() function.

I think my current goal is to find the exact start point of the migration
thread. Thanks again.

Yaodong




On Mon, Jul 8, 2013 at 10:32 AM, Michael Roth <mdr...@linux.vnet.ibm.com>wrote:

> Quoting Yaodong Yang (2013-07-07 09:55:06)
> > Hello everyone,
> >    I have a short question about the implementation of QEMU. When the
> qemu
> >    perform the live block migration using "migrate -b tcp:...." command.
> Does
> >    a new thread for migration created or not? I went through the code,
> only
> >    find that this activity is triggered in the main loop
> (main_loop_wait(int
>
> An outgoing non-blocking connection is triggered by
> tcp_start_outgoing_migration, once the connection is completed the
> tcp_wait_for_connect() callback is executed by the main loop.
>
> >    nonblocking) function). I want to know is there a new dedicated thread
> >    created for this migration task or not? If so, where in the code the
> new
> >    thread created.
>
> Within that callback there's a call to migrate_fd_connect(), which is
> where the
> migration thread is created.
>
> Incoming migration is still handled by the main loop's thread
>
> >    Thanks!
> >    Yaodong
> >    --
> >    Yaodong Yang
> >    Computer Science and Engineering Department
> >    University of Nebraska--Lincoln,
> >    Lincoln, NE, U.S.A.
>



-- 
Yaodong Yang
Computer Science and Engineering Department
University of Nebraska--Lincoln,
Lincoln, NE, U.S.A.

Reply via email to