From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44506) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V3nOR-0005Yg-Pe for qemu-devel@nongnu.org; Mon, 29 Jul 2013 09:21:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V3nOL-0007XR-PU for qemu-devel@nongnu.org; Mon, 29 Jul 2013 09:21:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34919) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V3nOL-0007XD-J2 for qemu-devel@nongnu.org; Mon, 29 Jul 2013 09:21:37 -0400 Date: Mon, 29 Jul 2013 15:21:29 +0200 From: Kevin Wolf Message-ID: <20130729132129.GE10467@dhcp-200-207.str.redhat.com> References: <1374762197-7261-1-git-send-email-pbonzini@redhat.com> <1374762197-7261-6-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1374762197-7261-6-git-send-email-pbonzini@redhat.com> Subject: Re: [Qemu-devel] [PATCH v3 05/19] block: make bdrv_co_is_allocated static List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: pl@kamp.de, qemu-devel@nongnu.org, stefanha@redhat.com, Charlie Shepherd Am 25.07.2013 um 16:23 hat Paolo Bonzini geschrieben: > bdrv_is_allocated can detect coroutine context and go through a fast > path, similar to other block layer functions. > > Reviewed-by: Eric Blake > Signed-off-by: Paolo Bonzini It can, but why is this a good idea? The other block layer functions do this because existing drivers call bdrv_(p)read/write(v) and we don't want them to block the vcpu. So it's basically just a method of avoiding massive changes to existing callers. The only such caller of bdrv_is_allocated() that I can see is vvfat, and I don't think optimising that is our top priority. Charlie is working in exactly the opposite direction, namely splitting the existing functions in a coroutine-only and a synchronous-only part. We should be clear what we really want here. Kevin