From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yoshiaki Tamura Subject: Re: [RFC PATCH 05/20] Introduce put_vector() and get_vector to QEMUFile and qemu_fopen_ops(). Date: Mon, 26 Apr 2010 19:43:52 +0900 Message-ID: <4BD56E68.2010803@lab.ntt.co.jp> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, qemu-devel@nongnu.org, avi@redhat.com, Anthony Liguori , mtosatti@redhat.com, ohmura.kei@lab.ntt.co.jp, yoshikawa.takuya@oss.ntt.co.jp To: Anthony Liguori Return-path: Received: from tama500.ecl.ntt.co.jp ([129.60.39.148]:50386 "EHLO tama500.ecl.ntt.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752261Ab0DZKoJ (ORCPT ); Mon, 26 Apr 2010 06:44:09 -0400 In-Reply-To: <4BD19F12.2020004@linux.vnet.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: Anthony Liguori wrote: > 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. I agree.