From mboxrd@z Thu Jan 1 00:00:00 1970 From: Amit Shah Subject: Re: [PATCH 12/28] virtio: console: Buffer data that comes in from the host Date: Fri, 4 Dec 2009 16:32:46 +0530 Message-ID: <20091204110246.GA16363@amit-x200.redhat.com> References: <1259391051-7752-1-git-send-email-amit.shah@redhat.com> <200912021414.20206.rusty@rustcorp.com.au> <20091202092406.GB28265@amit-x200.redhat.com> <200912030924.23783.rusty@rustcorp.com.au> <20091203034325.GA5340@amit-x200.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20091203034325.GA5340@amit-x200.redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.linux-foundation.org Errors-To: virtualization-bounces@lists.linux-foundation.org To: Rusty Russell Cc: Shirley Ma , "Michael S. Tsirkin" , virtualization@lists.linux-foundation.org List-Id: virtualization@lists.linuxfoundation.org On (Thu) Dec 03 2009 [09:13:25], Amit Shah wrote: > On (Thu) Dec 03 2009 [09:24:23], Rusty Russell wrote: > > On Wed, 2 Dec 2009 07:54:06 pm Amit Shah wrote: > > > On (Wed) Dec 02 2009 [14:14:20], Rusty Russell wrote: > > > > On Sat, 28 Nov 2009 05:20:35 pm Amit Shah wrote: > > > > > The console could be flooded with data from the host; handle > > > > > this situation by buffering the data. > > > > > > > > All this complexity makes me really wonder if we should just > > > > have the host say the max # ports it will ever use, and just do this > > > > really dumbly. Yes, it's a limitation, but it'd be much simpler. > > > > > > As in make sure the max nr ports is less than 255 and have per-port vqs? > > > And then the buffering will be done inside the vqs themselves? > > > > Well < 128 (two vqs per port). The config would say (with a feature bit) > > how many vq pairs there are. > > Sure. This was how the previous versions behaved as well. I forgot one detail: http://www.mail-archive.com/virtualization@lists.linux-foundation.org/msg06079.html Some API changes are needed to pre-declare the number of vqs and the selectively enable them as ports get added. How I think this could work is: probe: - get max_nr_ports from config_get - declare the intent to use max_nr_ports * 2 vqs with callbacks associated with half of them (so this allows us to have 512 vqs with 256 callbacks with the x86 MSI limit. : request_msix_vectors for all max_nr_ports vectors new functions to enable / disable vqs Amit