From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:57510) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TbTSZ-0008TJ-Fd for qemu-devel@nongnu.org; Thu, 22 Nov 2012 04:52:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TbTSY-0000MQ-Ca for qemu-devel@nongnu.org; Thu, 22 Nov 2012 04:52:39 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36738) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TbTSY-0000MJ-3p for qemu-devel@nongnu.org; Thu, 22 Nov 2012 04:52:38 -0500 Message-ID: <50ADF5DB.7060201@redhat.com> Date: Thu, 22 Nov 2012 10:52:27 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1353522781-12721-1-git-send-email-stefanha@redhat.com> <1353522781-12721-10-git-send-email-stefanha@redhat.com> <50ADF195.4030204@redhat.com> <20121122094507.GA24617@redhat.com> In-Reply-To: <20121122094507.GA24617@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 09/12] iov: add iov_get_ptr() to reference vector data List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Kevin Wolf , Anthony Liguori , dkoch@cloudswitch.com, qemu-devel@nongnu.org, Michael Roth , Blue Swirl , khoa@us.ibm.com, Stefan Hajnoczi , Asias He Il 22/11/2012 10:45, Michael S. Tsirkin ha scritto: > All this looks suspiciously like premature optimization to me. > Do we have data to show avoiding header copy is a win? The code is a little simpler, because we know the footer is 1 byte only. Paolo > The caller would have to handle the case where the header is not > contigious, which seems just too complex - in practice the code > seems to simply fail in this case. > > Why not just copy the header using iov_from_buf()/iov_to_buf() > and be done with it?