From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:38494) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QqQtK-0003sl-MQ for qemu-devel@nongnu.org; Mon, 08 Aug 2011 10:33:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QqQtJ-0001oS-Kb for qemu-devel@nongnu.org; Mon, 08 Aug 2011 10:33:18 -0400 Received: from mail-pz0-f42.google.com ([209.85.210.42]:57179) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QqQtJ-0001oN-DM for qemu-devel@nongnu.org; Mon, 08 Aug 2011 10:33:17 -0400 Received: by pzk37 with SMTP id 37so3092841pzk.29 for ; Mon, 08 Aug 2011 07:33:16 -0700 (PDT) Message-ID: <4E3FF3A8.2040805@codemonkey.ws> Date: Mon, 08 Aug 2011 09:33:12 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <4E3FE4CF.4060108@codemonkey.ws> <4E3FE9F0.9070702@redhat.com> <4E3FEF94.8090506@codemonkey.ws> <4E3FF145.5000705@redhat.com> In-Reply-To: <4E3FF145.5000705@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v4] XBZRLE delta for live migration of large memory apps List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: Stefan Hajnoczi , Dor Laor , qemu-devel Developers , libvirt-list@redhat.com, Blue Swirl , "Shribman, Aidan" On 08/08/2011 09:23 AM, Avi Kivity wrote: > On 08/08/2011 05:15 PM, Anthony Liguori wrote: >> >> If we did .so plugins, which I'm really not opposed to, I'd want the >> interface to be something like: >> >> typedef struct MigrationTransportClass >> { >> ssize_t (*writev)(MigrationTransport *obj, >> struct iovec *iov, >> int iovcnt); >> } MigrationTransportClass; >> >> I think it's useful to use an interface like this because it makes it >> easy to put the transport in a dedicated thread that didn't hold >> qemu_mutex (which is sort of equivalent to using a fork'd helper but >> is zero-copy at the expense of less isolation). > > If we have a shared object helper, the thread should be maintained by > qemu proper, not the plugin. > > I wouldn't call it "migration transport", but instead a > compression/decompression plugin. > > I don't think it merits a plugin at all though. There's limited scope > for compression and it best sits in qemu proper. If anything, it needs > to be more integrated (for example turning itself off if it doesn't > match enough). That adds a tremendous amount of complexity to QEMU. If we're going to change our compression algorithm, we would need to use a single algorithm that worked well for a wide variety of workloads. We struggle enough with migration as it is, it only would get worse if we have 10 different algorithms that we were dynamically enabling/disabling. The other option is to allow 1-off compression algorithms in the form of plugins. I think in this case, plugins are a pretty good compromise in terms of isolating complexity while allowing something that at least works very well for one particular type of workload. Regards, Anthony Liguori