From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: Extending virtio_console to support multiple ports Date: Mon, 31 Aug 2009 08:17:21 -0500 Message-ID: <4A9BCD61.2040903@codemonkey.ws> References: <1251181044-3696-1-git-send-email-amit.shah@redhat.com> <20090826112718.GA11117@amit-x200.redhat.com> <4A980D18.30106@codemonkey.ws> <20090830101057.GB32563@amit-x200.redhat.com> <4A9A7525.6010707@codemonkey.ws> <20090830131738.GC3401@amit-x200.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org To: Amit Shah Return-path: Received: from mail-yw0-f188.google.com ([209.85.211.188]:44961 "EHLO mail-yw0-f188.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752706AbZHaNRX (ORCPT ); Mon, 31 Aug 2009 09:17:23 -0400 Received: by ywh26 with SMTP id 26so6015056ywh.5 for ; Mon, 31 Aug 2009 06:17:24 -0700 (PDT) In-Reply-To: <20090830131738.GC3401@amit-x200.redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Amit Shah wrote: >> No flags, assume it's a streaming protocol and don't assume anything >> about message sizes. IOW, when you send clipboard data, send size and >> then the data. QEMU consumes bytes until it reaches size. >> > > Same intent but a different method: I'll have to specify that particular > data is "size" and that data after this special data is the actual data > stream. > Sounds like every stream protocol in existence :-) >>> - A lock has to be introduced to fetch one unused buffer from the list >>> and pass it on to the host. And this lock has to be a spinlock, just >>> because writes can be called from irq context. >>> >> I don't see a problem here. >> > > You mean you don't see a problem in using a spinlock vs not using one? > Right. This isn't a fast path. > Userspace will typically send the entire buffer to be transmitted in one > system call. If it's large, the system call will have to be broken into > several. This results in multiple guest system calls, each one to be > handled with a spinlock held. > > Compare this with the entire write handled in one system call in the > current method. > Does it matter? This isn't a fast path. Regards, Anthony Liguori