From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=36923 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OJUEm-0007eO-4Z for qemu-devel@nongnu.org; Tue, 01 Jun 2010 12:22:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OJUEk-0003Yz-8y for qemu-devel@nongnu.org; Tue, 01 Jun 2010 12:22:43 -0400 Received: from e5.ny.us.ibm.com ([32.97.182.145]:36359) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OJUEk-0003Yf-5Q for qemu-devel@nongnu.org; Tue, 01 Jun 2010 12:22:42 -0400 Received: from d01relay06.pok.ibm.com (d01relay06.pok.ibm.com [9.56.227.116]) by e5.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id o51G69gu015868 for ; Tue, 1 Jun 2010 12:06:09 -0400 Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by d01relay06.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o51GMeuW1155126 for ; Tue, 1 Jun 2010 12:22:40 -0400 Received: from d01av04.pok.ibm.com (loopback [127.0.0.1]) by d01av04.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id o51GMdoa018183 for ; Tue, 1 Jun 2010 12:22:40 -0400 Message-ID: <4C0533C8.1080309@linux.vnet.ibm.com> Date: Tue, 01 Jun 2010 11:22:32 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [PATCH 0/4] Threaded tcp incoming migration. References: <1275406821-30024-1-git-send-email-tamura.yoshiaki@lab.ntt.co.jp> <4C052E0C.4000804@linux.vnet.ibm.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Yoshiaki Tamura Cc: qemu-devel@nongnu.org On 06/01/2010 11:18 AM, Yoshiaki Tamura wrote: > 2010/6/2 Anthony Liguori: > >> On 06/01/2010 10:40 AM, Yoshiaki Tamura wrote: >> >>> Hi, >>> >>> This series add threaded tcp incoming migration. Currently, tcp migration >>> on >>> incoming side is blocked when outgoing has started on the remote side, and >>> you >>> can't do anything. With this series you can get info of incoming >>> migration by >>> calling "info migrate" like on outgoing side. Threaded tcp incoming >>> migration >>> is enable only when --enable-io-thread is set. >>> >>> >> I'm much less confident that threading is the answer here. We really would >> just need to have asynchronous incoming migration. >> > You mean, go back to select() in main(), and then call incoming > handler each time? > Won't it introduce more latency, resulting less throughput? > I wouldn't think so. With threads, you've got to acquire locks and that lock acquisition can be a source of significant latency. By blocking in select, you've got a straight dispatch path. Really, we'd get 99% of the way there just focusing on live loading of ram. There's really no need to make the final stage of migration live. > Although threading maybe a big hammer for just getting monitor > working, I think using thread for incoming handler may worth if it > doesn't heart performance on receiving data. > Unless I'm mistaken, the thread patches you've posted make no attempt at addressing the problem of locking. I believe that properly handling locking would result in the patch series increasing in size and complexity rather significantly. I think the simpler approach is to implement a state machine for ram loading. Regards, Anthony Liguori > The downside is mutual exclusion, of course... > > Thanks, > > Yoshi > > >> Regards, >> >> Anthony Liguori >> >> >>> This series apply on top of patch from Corentin posted on May 29. >>> >>> http://www.mail-archive.com/qemu-devel@nongnu.org/msg33830.html >>> >>> Yoshiaki Tamura (4): >>> qemu-thread: add qemu_thread_join(). >>> migration-tcp: threaded tcp incoming migration. >>> arch_init: calculate transferred bytes at ram_load(). >>> migration: add support to print migration info on incoming side. >>> >>> arch_init.c | 2 + >>> migration-tcp.c | 86 >>> ++++++++++++++++++++++++++++++++++++++++++++++--------- >>> migration.c | 18 +++++++++-- >>> migration.h | 2 +- >>> qemu-thread.c | 9 ++++++ >>> qemu-thread.h | 1 + >>> 6 files changed, 99 insertions(+), 19 deletions(-) >>> >>> >>> >> >> >>