From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:51401) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T6u35-0001ga-W7 for qemu-devel@nongnu.org; Wed, 29 Aug 2012 22:00:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T6u35-0006En-5a for qemu-devel@nongnu.org; Wed, 29 Aug 2012 21:59:59 -0400 Received: from e28smtp09.in.ibm.com ([122.248.162.9]:41442) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T6u34-0006Eb-IW for qemu-devel@nongnu.org; Wed, 29 Aug 2012 21:59:59 -0400 Received: from /spool/local by e28smtp09.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 30 Aug 2012 07:29:55 +0530 Received: from d28av05.in.ibm.com (d28av05.in.ibm.com [9.184.220.67]) by d28relay04.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q7U1xrWv3211738 for ; Thu, 30 Aug 2012 07:29:53 +0530 Received: from d28av05.in.ibm.com (loopback [127.0.0.1]) by d28av05.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q7U1xq1K029298 for ; Thu, 30 Aug 2012 11:59:53 +1000 Message-ID: <503EC8F8.4020906@linux.vnet.ibm.com> Date: Thu, 30 Aug 2012 09:59:20 +0800 From: Wenchao Xia MIME-Version: 1.0 References: <1346238308-24513-1-git-send-email-xiawenc@linux.vnet.ibm.com> <503DF8EB.3080507@redhat.com> In-Reply-To: <503DF8EB.3080507@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-29 19:11, Paolo Bonzini 写道: > Il 29/08/2012 13:05, Wenchao Xia ha scritto: >> + printf("checking aio status for %d times.\n", check_times); >> + while (true == qb_aio_check(broker)) { >> + check_times++; >> + usleep(1); >> + } >> + > > 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? > Paolo > -- Best Regards Wenchao Xia