Received: from eggs.gnu.org ([208.118.235.92]:50676) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPAWm-0003H0-HC for qemu-devel@nongnu.org; Mon, 08 Apr 2013 07:46:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UPAWh-00049R-V9 for qemu-devel@nongnu.org; Mon, 08 Apr 2013 07:46:24 -0400 Received: from mail-wi0-x22e.google.com ([2a00:1450:400c:c05::22e]:48413) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPAWh-00049D-Oj for qemu-devel@nongnu.org; Mon, 08 Apr 2013 07:46:19 -0400 Received: by mail-wi0-f174.google.com with SMTP id hj8so2440752wib.13 for ; Mon, 08 Apr 2013 04:46:19 -0700 (PDT) Date: Mon, 8 Apr 2013 13:46:16 +0200 From: Stefan Hajnoczi Message-ID: <20130408114616.GF12852@stefanha-thinkpad.redhat.com> References: <1364457355-4119-1-git-send-email-qemulist@gmail.com> <51540287.5030202@redhat.com> <20130328134049.GG22865@stefanha-thinkpad.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [RFC PATCH v2 0/4] port network layer onto glib List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: liu ping fan Cc: pbonzini@redhat.com, Anthony Liguori , qemu-devel@nongnu.org, mdroth On Tue, Apr 02, 2013 at 05:49:57PM +0800, liu ping fan wrote: > On Thu, Mar 28, 2013 at 9:40 PM, Stefan Hajnoczi wrote: > > On Thu, Mar 28, 2013 at 09:42:47AM +0100, Paolo Bonzini wrote: > >> Il 28/03/2013 08:55, Liu Ping Fan ha scritto: > >> > 3rd. block layer's AioContext will block other AioContexts on the same thread. > >> > >> I cannot understand this. > > > > The plan is for BlockDriverState to be bound to an AioContext. That > > means each thread is set up with one AioContext. BlockDriverStates that > > are used in that thread will first be bound to its AioContext. > > > > It's not very useful to have multiple AioContext in the same thread. > > > But it can be the case that we detach and re-attach the different > device( AioContext) to the same thread. I think that the design of > io_flush is to sync, but for NetClientState, we need something else. > So if we use AioContext, is it proper to extend readable/writeable > interface for qemu_aio_set_fd_handler()? Devices don't have AioContexts, threads do. When you bind a device to an AioContext the AioContext already exists independent of the device. Unfortunately I don't understand your question about io_flush and readable/writeable qemu_aio_set_fd_handler(). Stefan