From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42290) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCnRW-0007dE-Cb for qemu-devel@nongnu.org; Fri, 23 Aug 2013 05:14:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VCnRR-0002bH-Qm for qemu-devel@nongnu.org; Fri, 23 Aug 2013 05:14:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39001) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCnRR-0002b3-HG for qemu-devel@nongnu.org; Fri, 23 Aug 2013 05:14:01 -0400 Message-ID: <5217276B.4070300@redhat.com> Date: Fri, 23 Aug 2013 11:12:11 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1377069536-12658-1-git-send-email-lilei@linux.vnet.ibm.com> <1377069536-12658-14-git-send-email-lilei@linux.vnet.ibm.com> <52149B09.705@redhat.com> <52170060.4050104@linux.vnet.ibm.com> <521713DA.9010903@redhat.com> <521724A3.8050801@linux.vnet.ibm.com> In-Reply-To: <521724A3.8050801@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 13/18] arch_init: adjust ram_save_setup() for migrate_is_localhost List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Lei Li Cc: aarcange@redhat.com, quintela@redhat.com, qemu-devel@nongnu.org, mrhines@linux.vnet.ibm.com, Anthony Liguori , lagarcia@br.ibm.com, rcj@linux.vnet.ibm.com Il 23/08/2013 11:00, Lei Li ha scritto: >>> The performance assurance is very important to this feature, our goal is >>> 100ms of downtime for a 1TB guest. >> >> I honestly doubt that 100ms of downtime is possible while the machine is >> stopped. A 1TB guest has 2^28 = 268*10^6 pages, which you want to >> process in 100*10^6 nanoseconds. Thus, your approach would require 0.4 >> nanoseconds per page, or roughly 2 clock cycles per page. This is >> impossible without _massive_ parallelization at all levels, starting >> from the kernel. >> >> Have you thought of using shared memory (with -mempath) instead of >> vmsplice? > > Precisely! > > Well, as Anthony mentioned in the version 1[1], there has been some work involved > regarding improvement of vmsplice() at kernel side by Robert Jennings[2]. Oh, finally! > And yes, shared memory is an alternative, I think the problem with shared memory is > that can't share anonymous memory. For this maybe Anthony can chime in > as the original idea him. :-) You could perhaps switch from normal to shared memory while the VM is running? Either use the dirty bitmap for this, or mmap the shared memory "in place" on top of the anonymous memory. Since it needs to be done while the VM is stopped, you can do it perhaps 1G at a time and let the VM run for some time before doing the next 1G. The nice part is that because the VM is running, you can do it as slow as you want. :) Only the final flush and device save affects downtime. Paolo > > Reference links: > > [1] Anthony's comments: > https://lists.gnu.org/archive/html/qemu-devel/2013-06/msg02577.html > > [2] vmpslice support for zero-copy gifting of pages: > http://comments.gmane.org/gmane.linux.kernel.mm/103998 > >> >> Paolo >> > >