From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NXIMh-0002ic-GK for qemu-devel@nongnu.org; Tue, 19 Jan 2010 12:59:43 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NXIMc-0002dr-Nu for qemu-devel@nongnu.org; Tue, 19 Jan 2010 12:59:42 -0500 Received: from [199.232.76.173] (port=52328 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NXIMc-0002dc-Cp for qemu-devel@nongnu.org; Tue, 19 Jan 2010 12:59:38 -0500 Received: from mail2.shareable.org ([80.68.89.115]:35243) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NXIMc-00012F-09 for qemu-devel@nongnu.org; Tue, 19 Jan 2010 12:59:38 -0500 Date: Tue, 19 Jan 2010 17:59:33 +0000 From: Jamie Lokier Subject: Re: [Qemu-devel] [PATCH 0/8] virtio-console: Move to qdev, multiple devices, generic ports Message-ID: <20100119175933.GF1323@shareable.org> References: <1263475063-15238-1-git-send-email-amit.shah@redhat.com> <4B4F2B82.9000800@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4B4F2B82.9000800@codemonkey.ws> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Amit Shah , qemu-devel@nongnu.org Anthony Liguori wrote: > I think this is a pretty fundamental issue to work out since it > determines the very nature of the transport (stream vs. datagram). For the record, I don't think there's anything _wrong_ with a datagram transport. It would be quite useful sometimes. But if there is datagram support, it should be optional, just like you can choose between SOCK_STREAM and SOCK_DGRAM for AF_UNIX sockets. Something else occurred to me with the cut buffer application: What happens if the guest crashes, kexecs or whatever when it's half way through sending a cut buffer? A stream protocol will not have a nice way to recover from that unless there is an additional "out of band" way to say "I'm starting again". Does virtio-serial have an "I'm starting again" which is passed to the host side application? > Because you have to put a max buffer size on the transport, I think > buffering is a really flawed approach provably equivalent to just > increasing the message size within the transport. In general, the later > is a better approach because then the guest is using it's memory vs. > using host memory. I agree, using guest memory for the buffer also means there doesn't have to be an arbitrary limit on the buffer size, or a time limit. It can just wait there until it's consumed or the guest decides to restart. -- Jamie