From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:44654) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RgHOs-0005ug-7l for qemu-devel@nongnu.org; Thu, 29 Dec 2011 09:56:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RgHOr-0001Bc-41 for qemu-devel@nongnu.org; Thu, 29 Dec 2011 09:56:10 -0500 Received: from mx1.redhat.com ([209.132.183.28]:11925) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RgHOq-0001BX-S3 for qemu-devel@nongnu.org; Thu, 29 Dec 2011 09:56:09 -0500 Date: Thu, 29 Dec 2011 20:26:02 +0530 From: Amit Shah Message-ID: <20111229145602.GE4576@amit.redhat.com> References: <4EE9EBB9.9020300@de.ibm.com> <4EFC616F.4060806@de.ibm.com> <20111229140407.GC4576@amit.redhat.com> <4EFC7657.5090804@de.ibm.com> <20111229142658.GD4576@amit.redhat.com> <4EFC79EE.6020000@de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4EFC79EE.6020000@de.ibm.com> Subject: Re: [Qemu-devel] [PATCHv2] Fix virtio-console failure on unconnected pty List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christian Borntraeger Cc: "qemu-devel@nongnu.org" , Alexander Graf On (Thu) 29 Dec 2011 [15:32:14], Christian Borntraeger wrote: > > port->throttled never becomes true for qemu. > > Huh? What did I miss below? > > if (ret == -EAGAIN || (ret >= 0 && ret < buf_size)) { > virtio_serial_throttle_port(port, true); 'ret' here is the return value from info->have_data(), which is hw/virtio-console.c:flush_buf(). That function returns the value that qemu_chr_fe_write() returns, which is qemu-char.c:send_all() for pty, tcp, unix sockets. send_all() just keeps spinning here if it can't write, doesn't signal EAGAIN at all (or even a partial write). Can you print out the return values of have_data to check what's going on? Maybe you're hitting a case I never hit earlier and throttling indeed does get enabled? Amit