From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=51144 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OszyY-0002aV-9I for qemu-devel@nongnu.org; Tue, 07 Sep 2010 11:20:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OszyD-0002Mb-MY for qemu-devel@nongnu.org; Tue, 07 Sep 2010 11:20:29 -0400 Received: from e37.co.us.ibm.com ([32.97.110.158]:36154) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OszyD-0002MW-Ef for qemu-devel@nongnu.org; Tue, 07 Sep 2010 11:20:25 -0400 Received: from d03relay01.boulder.ibm.com (d03relay01.boulder.ibm.com [9.17.195.226]) by e37.co.us.ibm.com (8.14.4/8.13.1) with ESMTP id o87FIMST018888 for ; Tue, 7 Sep 2010 09:18:22 -0600 Received: from d03av05.boulder.ibm.com (d03av05.boulder.ibm.com [9.17.195.85]) by d03relay01.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o87FKLVF162482 for ; Tue, 7 Sep 2010 09:20:23 -0600 Received: from d03av05.boulder.ibm.com (loopback [127.0.0.1]) by d03av05.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id o87FKI2u007257 for ; Tue, 7 Sep 2010 09:20:20 -0600 Message-ID: <4C86582E.3040401@linux.vnet.ibm.com> Date: Tue, 07 Sep 2010 10:20:14 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] QEMU interfaces for image streaming and post-copy block migration References: <4C864118.7070206@linux.vnet.ibm.com> <4C865160.5030600@linux.vnet.ibm.com> <4C86539C.6020302@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: Stefan Hajnoczi Cc: "libvir-list@redhat.com" , qemu-devel , Stefan Hajnoczi On 09/07/2010 10:09 AM, Stefan Hajnoczi wrote: >> Right, so that argues for an incremental interface like I started with :-) >> >> BTW, this whole discussion is also relevant for other background tasks like >> online defragmentation so keep that use-case in mind too. >> > Right, I'm a little hesitant to get too far into discussing the > management interface because I remember long threads about polling and > async. I never fully read them but I bet some wisdom came out of them > that applies here. > > There are two ways to do a long running (async?) task: > 1. Multiple smaller pokes. Perhaps completion of a single poke is > async. But the key is that the interface is incremental and driven by > the management stack. > 2. State. Turn on streaming and watch it go. You can find out its > current state using another command which will tell you whether it is > enabled/disabled and progress. Use a command to disable it. > If everyone is going to do (1) by just doing a tight loop or just using the same simple mechanism (a sleep(5)), then I agree, we should do (2). I can envision people wanting to do very complex decisions about the right time to do the next poke though and I'm looking for feedback about what other people think. I expected people to do complex heuristics with respect to migration convergence but in reality, I don't think anyone does today. So while I generally like being flexible, I realize that too much flexibility isn't always a good thing :-) Regards, Anthony Liguori > Stefan >