From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:38345) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T6gBc-0001bU-IZ for qemu-devel@nongnu.org; Wed, 29 Aug 2012 07:11:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T6gBY-00019H-HP for qemu-devel@nongnu.org; Wed, 29 Aug 2012 07:11:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58158) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T6gBY-000199-93 for qemu-devel@nongnu.org; Wed, 29 Aug 2012 07:11:48 -0400 Message-ID: <503DF8EB.3080507@redhat.com> Date: Wed, 29 Aug 2012 13:11:39 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1346238308-24513-1-git-send-email-xiawenc@linux.vnet.ibm.com> In-Reply-To: <1346238308-24513-1-git-send-email-xiawenc@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit 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: Wenchao Xia Cc: kwolf@redhat.com, aliguori@us.ibm.com, stefanha@gmail.com, qemu-devel@nongnu.org, blauwirbel@gmail.com, eblake@redhat.com, afaerber@suse.de 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). Paolo