From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:55763) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S6kbb-0001id-4b for qemu-devel@nongnu.org; Sun, 11 Mar 2012 11:22:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S6kbW-00005Q-6U for qemu-devel@nongnu.org; Sun, 11 Mar 2012 11:22:42 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:51160) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S6kbV-00005H-VB for qemu-devel@nongnu.org; Sun, 11 Mar 2012 11:22:38 -0400 Message-ID: <4F5CC33B.606@msgid.tls.msk.ru> Date: Sun, 11 Mar 2012 19:22:35 +0400 From: Michael Tokarev MIME-Version: 1.0 References: <1331430564-32745-1-git-send-email-mjt@msgid.tls.msk.ru> <1331430564-32745-6-git-send-email-mjt@msgid.tls.msk.ru> <4F5CBDFE.2060301@redhat.com> In-Reply-To: <4F5CBDFE.2060301@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCHv2 5/7] Export qemu_sendv_recvv() and use it in qemu_sendv() and qemu_recvv() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org On 11.03.2012 19:00, Paolo Bonzini wrote: > Il 11/03/2012 02:49, Michael Tokarev ha scritto: >> Rename do_sendv_recvv() to qemu_sendv_recvv(), >> change its last arg (do_send) from int to bool, >> export it in qemu-common.h, and made the two >> callers of it (qemu_sendv() and qemu_recvv()) >> to be trivial #defines just adding 5th arg. > > GCC is smart and knows how to do tail calls in many cases. Thus, I > don't see very much the point of this patch. The point is to allow qemu_sendv_recvv() to be used directly, see the next patch [PATCHv2 6/7] cleanup qemu_co_sendv(), qemu_co_recvv() and friends for an example, and see my previous attempt to address all this with bdrv_* methods where reads and writes are implemented in common functions and are split back on layer boundary, just to go to a common routine on the next layer. Or worse yet, repeating exactly the same code like in this 6/7 patch for qemu_co_recvv() and qemu_co_sendv(). It is not about tail calls at all. Thanks, /mjt