From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KJm4T-0006iA-N0 for qemu-devel@nongnu.org; Fri, 18 Jul 2008 05:16:13 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KJm4R-0006go-LU for qemu-devel@nongnu.org; Fri, 18 Jul 2008 05:16:12 -0400 Received: from [199.232.76.173] (port=58560 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KJm4R-0006gb-H7 for qemu-devel@nongnu.org; Fri, 18 Jul 2008 05:16:11 -0400 Received: from cantor.suse.de ([195.135.220.2]:38748 helo=mx1.suse.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KJm4R-0007jd-6o for qemu-devel@nongnu.org; Fri, 18 Jul 2008 05:16:11 -0400 Message-ID: <48805EE3.3000206@suse.de> Date: Fri, 18 Jul 2008 11:14:11 +0200 From: Kevin Wolf MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 2/2] open ptys in non-blocking mode. References: <1215605958-22623-1-git-send-email-kraxel@redhat.com> <1215605958-22623-2-git-send-email-kraxel@redhat.com> <4880574C.1020703@suse.de> <48805DE9.9050105@redhat.com> In-Reply-To: <48805DE9.9050105@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 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: Gerd Hoffmann Cc: xen-devel@lists.xensource.com, Ian Jackson , qemu-devel@nongnu.org Gerd Hoffmann schrieb: > Kevin Wolf wrote: >> [Crossposting to xen-devel] >> >> Ian, we need something like this for qemu-xen (or ioemu-remote or >> whatever it's called now). Currently you must attach to the console of a >> domain, otherwise it won't boot up and keep hanging in a blocking write >> because the buffer is full. >> >> The old ioemu had a hack in unix_write (doing a select before the write) >> which you didn't merge into qemu-xen. In fact, I noticed that you even >> removed that function entirely and I'm wondering why. > > For completeness: You also need the attached patch for unix_write, > otherwise you'll end up with qemu burning cpu cycles. If you can't > write to a non-blocking file handle the write will instantly return with > -EAGAIN. Calling it again of course doesn't change the result, so > better don't do that ... As I metioned above, in qemu-xen there is no unix_write. It calls write() directly instead. But if we wanted to re-introduce unix_write to be closer to upstream qemu (I still don't know why unix_write was dropped in the first place for qemu-xen - Ian?) you're right, of course. Kevin