From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KLwEa-000864-GA for qemu-devel@nongnu.org; Thu, 24 Jul 2008 04:31:36 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KLwEX-00085s-W3 for qemu-devel@nongnu.org; Thu, 24 Jul 2008 04:31:35 -0400 Received: from [199.232.76.173] (port=51265 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KLwEX-00085p-PS for qemu-devel@nongnu.org; Thu, 24 Jul 2008 04:31:33 -0400 Received: from mx1.redhat.com ([66.187.233.31]:33711) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KLwEY-0002ln-9K for qemu-devel@nongnu.org; Thu, 24 Jul 2008 04:31:34 -0400 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id m6O8VQa3017375 for ; Thu, 24 Jul 2008 04:31:26 -0400 Received: from file.fab.redhat.com (file.fab.redhat.com [10.33.63.6]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m6O8VQgg009761 for ; Thu, 24 Jul 2008 04:31:26 -0400 Received: (from berrange@localhost) by file.fab.redhat.com (8.13.1/8.13.1/Submit) id m6O8VP2i003133 for qemu-devel@nongnu.org; Thu, 24 Jul 2008 09:31:25 +0100 Date: Thu, 24 Jul 2008 09:31:25 +0100 From: "Daniel P. Berrange" Subject: Re: [Qemu-devel] [PATCH 2/3] Always use nonblocking mode for qemu_chr_open_fd. Message-ID: <20080724083125.GB1138@redhat.com> References: <48871A7E.5030501@redhat.com> <20080723121510.GJ2291@redhat.com> <48872979.4050107@redhat.com> <48873F17.4030101@redhat.com> <48874D4A.8000604@codemonkey.ws> <20080723153133.GL2291@redhat.com> <48874F0B.3040609@codemonkey.ws> <4887598B.8070405@redhat.com> <48875D48.8030906@codemonkey.ws> <48883543.3070509@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <48883543.3070509@redhat.com> Reply-To: "Daniel P. Berrange" , qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Thu, Jul 24, 2008 at 09:54:43AM +0200, Gerd Hoffmann wrote: > Anthony Liguori wrote: > > I really don't like introducing polling. I think we should be trying to > > reduce the overall number of wake ups in QEMU, not add more. > > Right now qemu wakes up quite often anyway, so it doesn't become worse > (bad excuse, I know). > > > I'm inclined to say that we simply declare that reconnecting to a PTY is > > broken/unsupported and strongly encourage the use of something else > > (like unix sockets). That's always been my understanding FWIW. > > It's not only reconnects, its also the initial connect. > > Right now qemu simply blocks once the pty output buffer is full. With > nobody reading this effectively means qemu blocks forever and doesn't > responds any more to anything. It can't stay that way IMO. > > I think we have three options here: > > (1) Detect whenever someone is connected. Drawback: needs polling > (unless someone comes up with a better patch). > (2) Run ptys in non-blocking mode. Drawback: we risk loosing data > in case the pty reader is slow (also when nobody is connected of > course, but that is intentional ...). > (3) Drop pty support. Drawback: we break existing setups. NACK to that last option - I'd rather keep existing blocking behaviour, than break existing applications using PTYs. Daniel. -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|