From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KLvez-0007Gs-1g for qemu-devel@nongnu.org; Thu, 24 Jul 2008 03:54:49 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KLvey-0007GA-9h for qemu-devel@nongnu.org; Thu, 24 Jul 2008 03:54:48 -0400 Received: from [199.232.76.173] (port=33711 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KLvey-0007G1-6D for qemu-devel@nongnu.org; Thu, 24 Jul 2008 03:54:48 -0400 Received: from mx20.gnu.org ([199.232.41.8]:54528) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KLvey-0004uA-3O for qemu-devel@nongnu.org; Thu, 24 Jul 2008 03:54:48 -0400 Received: from mx1.redhat.com ([66.187.233.31]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KLvew-0003ko-N8 for qemu-devel@nongnu.org; Thu, 24 Jul 2008 03:54:46 -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 m6O7sjbs002335 for ; Thu, 24 Jul 2008 03:54:45 -0400 Received: from pobox.stuttgart.redhat.com (pobox.stuttgart.redhat.com [172.16.2.10]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m6O7si6D021573 for ; Thu, 24 Jul 2008 03:54:45 -0400 Received: from zweiblum.travel.kraxel.org (vpn-4-35.str.redhat.com [10.32.4.35]) by pobox.stuttgart.redhat.com (8.13.1/8.13.1) with ESMTP id m6O7siC4030602 for ; Thu, 24 Jul 2008 03:54:44 -0400 Message-ID: <48883543.3070509@redhat.com> Date: Thu, 24 Jul 2008 09:54:43 +0200 From: Gerd Hoffmann MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 2/3] Always use nonblocking mode for qemu_chr_open_fd. References: <488688E3.105@codemonkey.ws> <20080723082413.GA2291@redhat.com> <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> In-Reply-To: <48875D48.8030906@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Reply-To: 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 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. Comments? Other suggestions? cheers, Gerd -- http://kraxel.fedorapeople.org/xenner/