From: Rusty Russell <rusty@rustcorp.com.au>
To: Amit Shah <amit.shah@redhat.com>
Cc: virtualization@lists.linux-foundation.org
Subject: Re: [PATCH 01/15] virtio_console: Initialize hv_ops struct at declaration instead of in the probe() routine
Date: Thu, 12 Nov 2009 12:31:59 +1030 [thread overview]
Message-ID: <200911121231.59312.rusty@rustcorp.com.au> (raw)
In-Reply-To: <20091111184254.GB6416@amit-x200.redhat.com>
On Thu, 12 Nov 2009 05:12:54 am Amit Shah wrote:
> On (Tue) Nov 10 2009 [23:37:39], Rusty Russell wrote:
> > I chose "port" as a name; it's better once we're finished than
> > "struct virtio_console_struct".
>
> I wanted to separate out a 'virtio device' which has vqs common to all
> ports and a 'port', which has its buffers, tells us if it's a console
> port, and all the other port-specific stuff.
>
> I find 'port' and 'ports' confusing. In your implementation, 'port' has
> vqs.
Yep, that's wrong, no wonder you found it confusing. They should be in the
'struct ports'. ie. vq == struct ports =contains= N x struct port.
I'm steering away from the word "console", since that will now be one use
of this driver. We may end up renaming it "virtio_ports".
> > Re: [PATCH 04/15] virtio_console: Introduce a workqueue for handling host->guest notifications
> >
> > This one I disagree with. The host will wait until a buffer comes available.
> > It has to anyway, and it should work just fine. *If* we need speed, then we
> > might need workqueues so we reduce guest exits, but I don't think we need that
> > yet.
>
> So each port has a buffer that gets added to the vq and when data is
> received, it would be queued in the port-specific ring. Ports may want
> data to be cached when they're not open or when the userspace app is
> slow in reading the data. In that case, we'll have to allocate a new
> buffer to be stuffed in the vq.
OK, I was thinking one buffer per vq. But that doesn't really work for input,
since we might get input on any port, and not want it. Seems OK for output
tho.
Hmm, radical idea: how about 1 vq per input? Share one for output, but
separate ones for each input port? That limits us to 255 ports, but would
allow the simplistic "just put a buffer in the queue when you want to read".
May need a control input vq as well in this case?
Thanks,
Rusty.
next prev parent reply other threads:[~2009-11-12 2:01 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-10 9:41 virtio_console: support for multiple ports, console and generic Amit Shah
2009-11-10 9:41 ` [PATCH 01/15] virtio_console: Initialize hv_ops struct at declaration instead of in the probe() routine Amit Shah
2009-11-10 9:41 ` [PATCH 02/15] virtio_console: We support only one device at a time Amit Shah
2009-11-10 9:41 ` [PATCH 03/15] virtio_console: Club all globals into one struct Amit Shah
2009-11-10 9:41 ` [PATCH 04/15] virtio_console: Introduce a workqueue for handling host->guest notifications Amit Shah
2009-11-10 9:41 ` [PATCH 05/15] virtio_console: Buffer data that comes in from the host Amit Shah
2009-11-10 9:41 ` [PATCH 06/15] virtio_console: Create a buffer pool for sending data to host Amit Shah
2009-11-10 9:41 ` [PATCH 07/15] virtio_console: config: Prepare for handling multiple ports and hotplug Amit Shah
2009-11-10 9:41 ` [PATCH 08/15] virtio_console: Add support for multiple ports: console as well as generic Amit Shah
2009-11-10 9:41 ` [PATCH 09/15] virtio_console: Handle port hot-plug Amit Shah
2009-11-10 9:41 ` [PATCH 10/15] virtio_console: Register with sysfs and create a 'name' attribute Amit Shah
2009-11-10 9:41 ` [PATCH 11/15] virtio_console: Ensure only one process can have a port open at a time Amit Shah
2009-11-10 9:41 ` [PATCH 12/15] virtio_console: Add debugfs files for each port to expose debug info Amit Shah
2009-11-10 9:41 ` [PATCH 13/15] virtio_console: Add throttling support to prevent flooding ports Amit Shah
2009-11-10 9:41 ` [PATCH 14/15] virtio_console: Add option to remove cached buffers on port close Amit Shah
2009-11-10 9:41 ` [PATCH 15/15] virtio_console: Add ability to hot-unplug ports Amit Shah
2009-11-10 13:07 ` [PATCH 01/15] virtio_console: Initialize hv_ops struct at declaration instead of in the probe() routine Rusty Russell
2009-11-11 18:42 ` Amit Shah
2009-11-12 2:01 ` Rusty Russell [this message]
2009-11-12 5:54 ` Amit Shah
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200911121231.59312.rusty@rustcorp.com.au \
--to=rusty@rustcorp.com.au \
--cc=amit.shah@redhat.com \
--cc=virtualization@lists.linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).