From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O5Iq2-0001rP-Kf for qemu-devel@nongnu.org; Fri, 23 Apr 2010 09:22:34 -0400 Received: from [140.186.70.92] (port=55860 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O5Iq0-0001r0-Sd for qemu-devel@nongnu.org; Fri, 23 Apr 2010 09:22:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O5Ipy-0001Nc-S4 for qemu-devel@nongnu.org; Fri, 23 Apr 2010 09:22:32 -0400 Received: from e32.co.us.ibm.com ([32.97.110.150]:56357) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O5Ipy-0001NP-Mq for qemu-devel@nongnu.org; Fri, 23 Apr 2010 09:22:30 -0400 Received: from d03relay03.boulder.ibm.com (d03relay03.boulder.ibm.com [9.17.195.228]) by e32.co.us.ibm.com (8.14.3/8.13.1) with ESMTP id o3NDFZCK018417 for ; Fri, 23 Apr 2010 07:15:35 -0600 Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com [9.17.195.167]) by d03relay03.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o3NDMSeV062992 for ; Fri, 23 Apr 2010 07:22:28 -0600 Received: from d03av01.boulder.ibm.com (loopback [127.0.0.1]) by d03av01.boulder.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id o3NDMRVf002434 for ; Fri, 23 Apr 2010 07:22:27 -0600 Message-ID: <4BD19F12.2020004@linux.vnet.ibm.com> Date: Fri, 23 Apr 2010 08:22:26 -0500 From: Anthony Liguori 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> In-Reply-To: <4BD11604.3060309@lab.ntt.co.jp> Content-Type: text/plain; charset=ISO-8859-1; 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: Yoshiaki Tamura Cc: ohmura.kei@lab.ntt.co.jp, kvm@vger.kernel.org, mtosatti@redhat.com, Anthony Liguori , qemu-devel@nongnu.org, yoshikawa.takuya@oss.ntt.co.jp, avi@redhat.com On 04/22/2010 10:37 PM, Yoshiaki Tamura wrote: > Anthony Liguori wrote: >> On 04/21/2010 12:57 AM, Yoshiaki Tamura wrote: >>> QEMUFile currently doesn't support writev(). For sending multiple >>> data, such as pages, using writev() should be more efficient. >>> >>> Signed-off-by: Yoshiaki Tamura >> >> Is there performance data that backs this up? Since QEMUFile uses a >> linear buffer for most operations that's limited to 16k, I suspect you >> wouldn't be able to observe a difference in practice. > > 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. Regards, Anthony Liguori