* [Qemu-devel] QEMU live block-migration @ 2013-07-07 14:55 Yaodong Yang 2013-07-08 15:32 ` Michael Roth 0 siblings, 1 reply; 6+ messages in thread From: Yaodong Yang @ 2013-07-07 14:55 UTC (permalink / raw) To: qemu-discuss, qemu-devel; +Cc: Yaodong Yang [-- Attachment #1: Type: text/plain, Size: 602 bytes --] 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 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. Thanks! Yaodong -- Yaodong Yang Computer Science and Engineering Department University of Nebraska--Lincoln, Lincoln, NE, U.S.A. [-- Attachment #2: Type: text/html, Size: 751 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] QEMU live block-migration 2013-07-07 14:55 [Qemu-devel] QEMU live block-migration Yaodong Yang @ 2013-07-08 15:32 ` Michael Roth 2013-07-08 15:57 ` Yaodong Yang 0 siblings, 1 reply; 6+ messages in thread From: Michael Roth @ 2013-07-08 15:32 UTC (permalink / raw) To: Yaodong Yang, qemu-discuss, qemu-devel; +Cc: Yaodong Yang 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. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] QEMU live block-migration 2013-07-08 15:32 ` Michael Roth @ 2013-07-08 15:57 ` Yaodong Yang 2013-07-08 17:18 ` Michael Roth 0 siblings, 1 reply; 6+ messages in thread From: Yaodong Yang @ 2013-07-08 15:57 UTC (permalink / raw) To: Michael Roth; +Cc: qemu-devel, qemu-discuss [-- Attachment #1: Type: text/plain, Size: 1843 bytes --] 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 <mdroth@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. [-- Attachment #2: Type: text/html, Size: 2742 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] QEMU live block-migration 2013-07-08 15:57 ` Yaodong Yang @ 2013-07-08 17:18 ` Michael Roth 2013-07-08 17:29 ` Yaodong Yang 0 siblings, 1 reply; 6+ messages in thread From: Michael Roth @ 2013-07-08 17:18 UTC (permalink / raw) To: Yaodong Yang; +Cc: qemu-devel, qemu-discuss Quoting Yaodong Yang (2013-07-08 10:57:25) > 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? Yup > Also, I did not find any thread_create related function in the > migrate_fd_connect() function. What version of QEMU are you looking at? For current releases you should see the following in migrate_fd_connect(): qemu_thread_create(&s->thread, migration_thread, s, QEMU_THREAD_JOINABLE); ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] QEMU live block-migration 2013-07-08 17:18 ` Michael Roth @ 2013-07-08 17:29 ` Yaodong Yang 2013-07-08 18:02 ` Yaodong Yang 0 siblings, 1 reply; 6+ messages in thread From: Yaodong Yang @ 2013-07-08 17:29 UTC (permalink / raw) To: Michael Roth; +Cc: qemu-devel, qemu-discuss [-- Attachment #1: Type: text/plain, Size: 1053 bytes --] I used the qemu-kvm 1.2.0, so I did not find it in the code. I will move to the current qemu version. Thanks! On Mon, Jul 8, 2013 at 12:18 PM, Michael Roth <mdroth@linux.vnet.ibm.com>wrote: > Quoting Yaodong Yang (2013-07-08 10:57:25) > > 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? > > Yup > > > Also, I did not find any thread_create related function in the > > migrate_fd_connect() function. > > What version of QEMU are you looking at? For current releases you should > see > the following in migrate_fd_connect(): > > qemu_thread_create(&s->thread, migration_thread, s, > QEMU_THREAD_JOINABLE); > -- Yaodong Yang Computer Science and Engineering Department University of Nebraska--Lincoln, Lincoln, NE, U.S.A. [-- Attachment #2: Type: text/html, Size: 1576 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] QEMU live block-migration 2013-07-08 17:29 ` Yaodong Yang @ 2013-07-08 18:02 ` Yaodong Yang 0 siblings, 0 replies; 6+ messages in thread From: Yaodong Yang @ 2013-07-08 18:02 UTC (permalink / raw) To: Michael Roth; +Cc: qemu-devel, qemu-discuss [-- Attachment #1: Type: text/plain, Size: 1465 bytes --] Yes, I found it in the qemu-1.5.1 and it's much clear for me now. I think I need to work on this version, other than the out-of-date version qemu-kvm-1.2.0. Thanks a lot. On Mon, Jul 8, 2013 at 12:29 PM, Yaodong Yang <yyang@cse.unl.edu> wrote: > I used the qemu-kvm 1.2.0, so I did not find it in the code. I will move > to the current qemu version. Thanks! > > > > On Mon, Jul 8, 2013 at 12:18 PM, Michael Roth <mdroth@linux.vnet.ibm.com>wrote: > >> Quoting Yaodong Yang (2013-07-08 10:57:25) >> > 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? >> >> Yup >> >> > Also, I did not find any thread_create related function in the >> > migrate_fd_connect() function. >> >> What version of QEMU are you looking at? For current releases you should >> see >> the following in migrate_fd_connect(): >> >> qemu_thread_create(&s->thread, migration_thread, s, >> QEMU_THREAD_JOINABLE); >> > > > > -- > 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. [-- Attachment #2: Type: text/html, Size: 2343 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-07-08 18:02 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-07-07 14:55 [Qemu-devel] QEMU live block-migration Yaodong Yang 2013-07-08 15:32 ` Michael Roth 2013-07-08 15:57 ` Yaodong Yang 2013-07-08 17:18 ` Michael Roth 2013-07-08 17:29 ` Yaodong Yang 2013-07-08 18:02 ` Yaodong Yang
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).