From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LaEiI-0006hR-Oc for qemu-devel@nongnu.org; Thu, 19 Feb 2009 14:37:38 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LaEiH-0006gY-9Z for qemu-devel@nongnu.org; Thu, 19 Feb 2009 14:37:38 -0500 Received: from [199.232.76.173] (port=32896 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LaEiG-0006gT-WF for qemu-devel@nongnu.org; Thu, 19 Feb 2009 14:37:37 -0500 Received: from mail2.shareable.org ([80.68.89.115]:60577) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LaEiG-0005ha-IC for qemu-devel@nongnu.org; Thu, 19 Feb 2009 14:37:36 -0500 Date: Thu, 19 Feb 2009 19:37:33 +0000 From: Jamie Lokier Subject: Re: [Qemu-devel] migration: adding migration to/from a file (v2) Message-ID: <20090219193733.GB22319@shareable.org> References: <499D4654.9000305@redhat.com> <499D652D.60803@codemonkey.ws> <499D8564.1070007@redhat.com> <499D8E05.2060207@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <499D8E05.2060207@codemonkey.ws> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Uri Lublin Anthony Liguori wrote: > Uri Lublin wrote: > >Anthony Liguori wrote: > >>Uri Lublin wrote: > >>> > >>>Migration to file, uses migration-to-fd (supports live migration). > >>>Migration from file, uses qemu-fopen directly. > >> > >>Eh? Haven't we already talked about why this doesn't work? Maybe > >>there's a v3 that you meant to send? > >> > > > >Actually I do have a v3 which uses posix-aio-compat.c > >It's a much more complicated solution then just writing to a file though. > >Also I am not sure if I need to use a signal or not as the migration > >(to-fd) code is polling. And if I use signal should I use SIGUSR2 or a > >different one and use a pipe similar to block-raw-posix.c ? > > How is the migration code polling? It will attempt to do writes until a > write returns EAGAIN. At this point, it will wait for notification that > the more writes are available. > Remember, migration is a streaming > protocol, not a random access, so it only makes sense to have one > outstanding request at a time. Fwow, often with streaming (in general) the highest performance comes from having two or more outstanding requests at a time, so there are no gaps between requests being processed at the OS and device level. However, unless migrate-to-file uses O_DIRECT that will be hidden by the OS's buffering. Then the remaining overhead from AIOs (or fake AIOs using threads) is lots context switching, one per write completed. -- Jamie