Received: from eggs.gnu.org ([208.118.235.92]:33718) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKq99-0002Rx-Uw for qemu-devel@nongnu.org; Wed, 27 Mar 2013 09:12:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UKq95-00043U-6Z for qemu-devel@nongnu.org; Wed, 27 Mar 2013 09:12:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48561) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKq94-00043H-VQ for qemu-devel@nongnu.org; Wed, 27 Mar 2013 09:12:03 -0400 From: Juan Quintela In-Reply-To: <20130327085156.GA14550@stefanha-thinkpad.muc.redhat.com> (Stefan Hajnoczi's message of "Wed, 27 Mar 2013 09:51:56 +0100") References: <1364314072-2474-1-git-send-email-stefanha@redhat.com> <20130327085156.GA14550@stefanha-thinkpad.muc.redhat.com> Date: Wed, 27 Mar 2013 14:06:36 +0100 Message-ID: <87wqstj8kj.fsf@elfo.elfo> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH 0/4] monitor: do not rely on O_NONBLOCK for passed file descriptors Reply-To: quintela@redhat.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Anthony Liguori , david.pravec@nethost.cz, mprivozn@redhat.com, Corey Bryant , liu ping fan , qemu-devel@nongnu.org Stefan Hajnoczi wrote: > On Wed, Mar 27, 2013 at 04:37:52PM +0800, liu ping fan wrote: >> On Wed, Mar 27, 2013 at 12:07 AM, Stefan Hajnoczi wrote: >> > There are several places where QEMU accidentally relies on the >> > O_NONBLOCK state >> > of passed file descriptors. Exposing O_NONBLOCK state makes it >> > part of the QMP >> >> If in future, we push more backend on their dedicated thread, will the >> related fd be block? > > This series is not related to threading in QEMU. The convention it > establishes is that passed fds are blocking. If QEMU wants to use ^^^^^^^^ You mean here non-blocking > nonblocking it must call qemu_set_block(fd). This works whether it is ^^^^^^^^^^^^^^^^^^ or here qemu_set_nonblock(fd) no? I guess the second one O:-) Later, Juan. > done from a traditional QEMU thread or a data plane thread. > > Stefan