From: Rusty Russell <rusty@rustcorp.com.au>
To: Amit Shah <amit.shah@redhat.com>
Cc: virtualization@lists.linux-foundation.org
Subject: Re: [PATCH 8/8] virtio: console: struct ports for multiple ports per device.
Date: Tue, 10 Nov 2009 23:44:02 +1030 [thread overview]
Message-ID: <200911102344.03087.rusty@rustcorp.com.au> (raw)
In-Reply-To: <20091110072414.GA17361@amit-x200.redhat.com>
On Tue, 10 Nov 2009 05:54:14 pm Amit Shah wrote:
> > 2) Do we really need more than input buffer at a time? If not, it's easy to
> > generalize the input callback. This will be slow, but shouldn't be a
> > problem.
>
> In my testing of a vnc clipboard copy/paste, the vnc client only sent the
> clipboard data once and didn't bother about retransmitting if write()
> returned < len. It's a problem with the vnc client I used (tigervnc, which is
> based off tightvnc) though but adding that support would hurt?
Well, input buffer == read, output buffer == write. But same deal.
And sure, simplest implementation would just return a short read/write.
But we can certainly loop inside our ->write and wait until all the data is
written, too (document why, maybe with O_NONBLOCK not looping).
> > This should be really easy to construct, and for input in the !multiport
> > path we can fake one up. We ignore CONTINUES on input since we don't have
> > a userspace API which understands framing (we'd need recvmsg).
>
> The header should only be sent (and expected) in the multiport case, so
> this won't matter when the .._F_MULTIPORT feature is not found.
Yeah, but our code might be neater if we "always" have a header internally;
only one place would need to branch. Obviously we have to see, but I was
thinking ahead.
> > 4) Hook it all together with the new feature bit.
>
> I've actually split it into 4 feature bits:
> MULTIPORT means multiple ports and a header
> THROTTLE to save host and guest from OOM
> CACHING to allow ports to buffer data even after the char device is
> closed
> UNPLUG to allow port unplug
>
> (I added these as part of the splitting effort because they're now in
> individual patches)
OK, though I'm not adverse to partial feature implementations during a
consecutive patch series.
Technically, it's EXPERIMENTAL, so we can do stuff like that :)
Cheers,
Rusty.
next prev parent reply other threads:[~2009-11-10 13:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1257834450..rusty@rustcorp.com.au>
2009-11-10 6:57 ` [PATCH 8/8] virtio: console: struct ports for multiple ports per device Rusty Russell
2009-11-10 7:24 ` Amit Shah
2009-11-10 13:14 ` Rusty Russell [this message]
2009-11-10 8:56 ` [PATCH 3/8] hvc_console: make the ops pointer const Christian Borntraeger
2009-11-10 9:33 ` [PATCH 8/8] virtio: console: struct ports for multiple ports per device Amit Shah
2009-11-10 12:51 ` Rusty Russell
2009-11-10 6:27 Rusty Russell
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=200911102344.03087.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).