From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47708) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VlIAl-0006UZ-JB for qemu-devel@nongnu.org; Tue, 26 Nov 2013 07:55:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VlIAf-0002zg-7v for qemu-devel@nongnu.org; Tue, 26 Nov 2013 07:55:23 -0500 Received: from mx1.redhat.com ([209.132.183.28]:50688) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VlIAf-0002zL-0t for qemu-devel@nongnu.org; Tue, 26 Nov 2013 07:55:17 -0500 Message-ID: <52949A19.1010307@redhat.com> Date: Tue, 26 Nov 2013 13:54:49 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1385025100-3191-1-git-send-email-lilei@linux.vnet.ibm.com> <1385025100-3191-17-git-send-email-lilei@linux.vnet.ibm.com> <529486B5.90500@redhat.com> <52948E18.6070503@linux.vnet.ibm.com> In-Reply-To: <52948E18.6070503@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 16/17] migration: adjust migration_thread() process for page flipping 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, mdroth@linux.vnet.ibm.com, aliguori@amazon.com, lagarcia@br.ibm.com, rcj@linux.vnet.ibm.com Il 26/11/2013 13:03, Lei Li ha scritto: >>> >>> + if (pending_size && pending_size >= max_size && >>> + !runstate_needs_reset()) { >>> qemu_savevm_state_iterate(s->file); >> I'm not sure why you need this. > > The adjustment here is to avoid the iteration stage for page flipping. > Because pending_size = ram_save_remaining() * TARGET_PAGE_SIZE which is > not 0 and pending_size > max_size (0) at start. It's still not clear to me that avoiding the iteration stage is necessary. I think it's just an optimization to avoid scanning the bitmap, but: (1) Juan's bitmap optimization will make this mostly unnecessary (2) getting good downtime from page flipping will require postcopy anyway. > And you said 'This is a bit ugly but I understand the need. Perhaps "&& > !runstate_needs_reset()" like below?' :) Oops. I might have said this before thinking about postcopy and/or before seeing the benchmark results from Juan's patches. If this part of the patch is just an optimization, I'd rather leave it out for now. Thanks for putting up with me. :) Paolo