From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43027) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T7H8O-0002Hc-6t for qemu-devel@nongnu.org; Thu, 30 Aug 2012 22:39:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T7H8N-0002xY-A2 for qemu-devel@nongnu.org; Thu, 30 Aug 2012 22:39:00 -0400 Received: from e28smtp05.in.ibm.com ([122.248.162.5]:33608) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T7H8M-0002xL-NC for qemu-devel@nongnu.org; Thu, 30 Aug 2012 22:38:59 -0400 Received: from /spool/local by e28smtp05.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 31 Aug 2012 08:08:54 +0530 Received: from d28av03.in.ibm.com (d28av03.in.ibm.com [9.184.220.65]) by d28relay03.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q7V2cqtm62062762 for ; Fri, 31 Aug 2012 08:08:52 +0530 Received: from d28av03.in.ibm.com (loopback [127.0.0.1]) by d28av03.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q7V2cp1V001515 for ; Fri, 31 Aug 2012 12:38:51 +1000 Message-ID: <50402389.60106@linux.vnet.ibm.com> Date: Fri, 31 Aug 2012 10:38:01 +0800 From: Wenchao Xia MIME-Version: 1.0 References: <1346238308-24513-1-git-send-email-xiawenc@linux.vnet.ibm.com> <503DF8EB.3080507@redhat.com> <503EC8F8.4020906@linux.vnet.ibm.com> <503F1A60.6070802@redhat.com> In-Reply-To: <503F1A60.6070802@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v3 2/5] [RFC] libqblock, user example List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: kwolf@redhat.com, aliguori@us.ibm.com, stefanha@gmail.com, qemu-devel@nongnu.org, blauwirbel@gmail.com, eblake@redhat.com, afaerber@suse.de 于 2012-8-30 15:46, Paolo Bonzini 写道: > Il 30/08/2012 03:59, Wenchao Xia ha scritto: >>>> >>> >>> Busy waiting is not acceptable, and this is the reason why I had >>> suggested to keep AIO out of the design for now. >>> >>> You need to provide an implementation of AIO for either glib or >>> something else, but this is best done within QEMU first (and only later >>> moved to libqblock). >>> >> It is similar to qemu's "select" type of AIO, while (true == >> qb_aio_check(broker) is not neccessary but an example here >> to ensure write i/o is executed first. >> Do you mean qemu's aio should be improved to another type of >> AIO API instead of select type? which kind of AIO api is preferred? > > Using GSource to integrate with the QEMU main loop would be an idea. > qemu_aio_wait would remain. > > However, this is not relevant to libqblock. My point is that APIs are > hard to get right, and even harder if you try to do too many things in > the first iteration. > > Paolo > > OK, I got your point, will focus on a small set of API in the first version, then bring AIO with GSource in next step. -- Best Regards Wenchao Xia