From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:33642) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QqQcU-00042Z-Qy for qemu-devel@nongnu.org; Mon, 08 Aug 2011 10:15:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QqQcT-0006eq-2t for qemu-devel@nongnu.org; Mon, 08 Aug 2011 10:15:54 -0400 Received: from mail-pz0-f42.google.com ([209.85.210.42]:54046) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QqQcS-0006ek-Pa for qemu-devel@nongnu.org; Mon, 08 Aug 2011 10:15:53 -0400 Received: by pzk37 with SMTP id 37so3066017pzk.29 for ; Mon, 08 Aug 2011 07:15:51 -0700 (PDT) Message-ID: <4E3FEF94.8090506@codemonkey.ws> Date: Mon, 08 Aug 2011 09:15:48 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <4E3FE4CF.4060108@codemonkey.ws> <4E3FE9F0.9070702@redhat.com> In-Reply-To: <4E3FE9F0.9070702@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 08:51 AM, Avi Kivity wrote: > On 08/08/2011 04:29 PM, Anthony Liguori wrote: >> >> One thing that strikes me about this algorithm is that it's very good >> for a particular type of workload--shockingly good really. > > Poking bytes at random places in memory is fairly generic. If you have a > lot of small objects, and modify a subset of them, this is the pattern > you get. > >> >> I think workload aware migration compression is possible for a lot of >> different types of workloads. That makes me a bit wary of QEMU growing >> quite a lot of compression mechanisms. >> >> It makes me think that this logic may really belong at a higher level >> where more information is known about the workload. For instance, I >> can imagine XBZRLE living in something like libvirt. > > A better model would be plugin based. exec helpers are plugins. They just live in a different address space and a channel to exchange data (pipe). 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). Regards, Anthony Liguori >