From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O5JFK-0001qY-FV for qemu-devel@nongnu.org; Fri, 23 Apr 2010 09:48:42 -0400 Received: from [140.186.70.92] (port=57817 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O5JFI-0001oM-DI for qemu-devel@nongnu.org; Fri, 23 Apr 2010 09:48:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O5JFF-0005bq-C1 for qemu-devel@nongnu.org; Fri, 23 Apr 2010 09:48:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51400) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O5JFF-0005bg-1J for qemu-devel@nongnu.org; Fri, 23 Apr 2010 09:48:37 -0400 Message-ID: <4BD1A52C.1090406@redhat.com> Date: Fri, 23 Apr 2010 16:48:28 +0300 From: Avi Kivity MIME-Version: 1.0 References: <1271829445-5328-1-git-send-email-tamura.yoshiaki@lab.ntt.co.jp> <1271829445-5328-6-git-send-email-tamura.yoshiaki@lab.ntt.co.jp> <4BD0A35E.8000205@linux.vnet.ibm.com> <4BD11604.3060309@lab.ntt.co.jp> <4BD19F12.2020004@linux.vnet.ibm.com> In-Reply-To: <4BD19F12.2020004@linux.vnet.ibm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [RFC PATCH 05/20] Introduce put_vector() and get_vector to QEMUFile and qemu_fopen_ops(). List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: ohmura.kei@lab.ntt.co.jp, kvm@vger.kernel.org, qemu-devel@nongnu.org, mtosatti@redhat.com, Anthony Liguori , Yoshiaki Tamura , yoshikawa.takuya@oss.ntt.co.jp On 04/23/2010 04:22 PM, Anthony Liguori wrote: >> I currently don't have data, but I'll prepare it. >> There were two things I wanted to avoid. >> >> 1. Pages to be copied to QEMUFile buf through qemu_put_buffer. >> 2. Calling write() everytime even when we want to send multiple pages >> at once. >> >> I think 2 may be neglectable. >> But 1 seems to be problematic if we want make to the latency as small >> as possible, no? > > > Copying often has strange CPU characteristics depending on whether the > data is already in cache. It's better to drive these sort of > optimizations through performance measurement because changes are not > always obvious. Copying always introduces more cache pollution, so even if the data is in the cache, it is worthwhile (not disagreeing with the need to measure). -- Do not meddle in the internals of kernels, for they are subtle and quick to panic.