From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:39680) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQHUx-0000yS-T8 for qemu-devel@nongnu.org; Thu, 11 Apr 2013 09:25:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UQHUu-0002EK-8X for qemu-devel@nongnu.org; Thu, 11 Apr 2013 09:25:07 -0400 Received: from e9.ny.us.ibm.com ([32.97.182.139]:55960) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQHUt-0002CH-Sc for qemu-devel@nongnu.org; Thu, 11 Apr 2013 09:25:04 -0400 Received: from /spool/local by e9.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 11 Apr 2013 09:25:03 -0400 Received: from d01relay06.pok.ibm.com (d01relay06.pok.ibm.com [9.56.227.116]) by d01dlp02.pok.ibm.com (Postfix) with ESMTP id EC4806E804C for ; Thu, 11 Apr 2013 09:24:56 -0400 (EDT) Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay06.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r3BDOxCf26804316 for ; Thu, 11 Apr 2013 09:24:59 -0400 Received: from d01av02.pok.ibm.com (loopback [127.0.0.1]) by d01av02.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r3BDOxE8024340 for ; Thu, 11 Apr 2013 10:24:59 -0300 Message-ID: <5166B9A9.9070904@linux.vnet.ibm.com> Date: Thu, 11 Apr 2013 09:24:57 -0400 From: "Michael R. Hines" MIME-Version: 1.0 References: <1365632901-15470-1-git-send-email-mrhines@linux.vnet.ibm.com> <1365632901-15470-11-git-send-email-mrhines@linux.vnet.ibm.com> <20130411073843.GB19601@redhat.com> <51667FEE.903@redhat.com> In-Reply-To: <51667FEE.903@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH RDMA support v1: 10/13] introduce new command migrate_check_for_zero List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: aliguori@us.ibm.com, "Michael S. Tsirkin" , qemu-devel@nongnu.org, owasserm@redhat.com, abali@us.ibm.com, mrhines@us.ibm.com, gokul@us.ibm.com That's very accurate. Zero page scanning *after* the bulk phase is not very helpful in general. Are we proposing to skip is_dup_page() after the bulk phase has finished? The testcase I'm using is a "worst-case" stress memory hog command (apt-get install stress) - but against this does not affect anything until we assume the bulk phase has already completed. On 04/11/2013 05:18 AM, Paolo Bonzini wrote: > Il 11/04/2013 09:38, Michael S. Tsirkin ha scritto: >> On Wed, Apr 10, 2013 at 06:28:18PM -0400, mrhines@linux.vnet.ibm.com wrote: >>> From: "Michael R. Hines" >>> >>> This allows the user to disable zero page checking during migration >>> >>> Signed-off-by: Michael R. Hines >> IMO this knob is too low level to expose to management. >> Why not disable this automatically when migrating with rdma? > Thinking more about it, I'm not sure why it is important to disable it. > > As observed earlier: > > 1) non-zero pages typically have a non-zero word in the first 32 bytes, > as measured by Peter Lieven, so the cost of is_dup_page can be ignored > for non-zero pages. > > 2) all-zero pages typically change little, so they are rare after the > bulk phase where all memory is sent once to the destination. > > Hence, the cost of is_dup_page can be ignored after the bulk phase. In > the bulk phase, checking for zero pages it may be expensive and lower > throughput, sure, but what matters for convergence is throughput and > latency _after_ the bulk phase. > > At least this is the theory. mrhines, what testcase were you using? If > it is an idle guest, it is not a realistic one and the decreased > latency/throughput does not really matter. > > Paolo