[Qemu-devel] [PATCH 5/8] virtio-serial-bus: Add support for buffering guest output, throttling guests

2010-01-14 Thread Amit Shah
We have to buffer data from guest as ports may not consume all the data in one go or the guest could be fast in sending data and the apps may not consume at the same rate. We keep caching data the guest sends us till a port accepts it. However, this could lead to an OOM condition where a rogue

Re: [Qemu-devel] [PATCH 5/8] virtio-serial-bus: Add support for buffering guest output, throttling guests

2010-01-13 Thread Markus Armbruster
Anthony Liguori anth...@codemonkey.ws writes: On 01/12/2010 01:16 AM, Amit Shah wrote: BTW I don't really want this too, I can get rid of it if everyone agrees we won't support clipboard writes 4k over vnc or if there's a better idea. Why bother trying to preserve message boundaries?

Re: [Qemu-devel] [PATCH 5/8] virtio-serial-bus: Add support for buffering guest output, throttling guests

2010-01-13 Thread Anthony Liguori
On 01/13/2010 11:14 AM, Markus Armbruster wrote: Anthony Liguorianth...@codemonkey.ws writes: On 01/12/2010 01:16 AM, Amit Shah wrote: BTW I don't really want this too, I can get rid of it if everyone agrees we won't support clipboard writes 4k over vnc or if there's a better

Re: [Qemu-devel] [PATCH 5/8] virtio-serial-bus: Add support for buffering guest output, throttling guests

2010-01-12 Thread Anthony Liguori
On 01/12/2010 01:16 AM, Amit Shah wrote: BTW I don't really want this too, I can get rid of it if everyone agrees we won't support clipboard writes 4k over vnc or if there's a better idea. Why bother trying to preserve message boundaries? I think that's the fundamental question.

Re: [Qemu-devel] [PATCH 5/8] virtio-serial-bus: Add support for buffering guest output, throttling guests

2010-01-12 Thread Amit Shah
On (Tue) Jan 12 2010 [09:00:52], Anthony Liguori wrote: On 01/12/2010 01:16 AM, Amit Shah wrote: BTW I don't really want this too, I can get rid of it if everyone agrees we won't support clipboard writes 4k over vnc or if there's a better idea. Why bother trying to preserve message

Re: [Qemu-devel] [PATCH 5/8] virtio-serial-bus: Add support for buffering guest output, throttling guests

2010-01-12 Thread Anthony Liguori
On 01/12/2010 09:13 AM, Amit Shah wrote: On (Tue) Jan 12 2010 [09:00:52], Anthony Liguori wrote: On 01/12/2010 01:16 AM, Amit Shah wrote: BTW I don't really want this too, I can get rid of it if everyone agrees we won't support clipboard writes 4k over vnc or if there's a better

Re: [Qemu-devel] [PATCH 5/8] virtio-serial-bus: Add support for buffering guest output, throttling guests

2010-01-12 Thread Amit Shah
On (Tue) Jan 12 2010 [09:46:55], Anthony Liguori wrote: On 01/12/2010 09:13 AM, Amit Shah wrote: On (Tue) Jan 12 2010 [09:00:52], Anthony Liguori wrote: On 01/12/2010 01:16 AM, Amit Shah wrote: BTW I don't really want this too, I can get rid of it if everyone agrees we won't

Re: [Qemu-devel] [PATCH 5/8] virtio-serial-bus: Add support for buffering guest output, throttling guests

2010-01-12 Thread Anthony Liguori
On 01/12/2010 09:49 AM, Amit Shah wrote: On (Tue) Jan 12 2010 [09:46:55], Anthony Liguori wrote: On 01/12/2010 09:13 AM, Amit Shah wrote: On (Tue) Jan 12 2010 [09:00:52], Anthony Liguori wrote: On 01/12/2010 01:16 AM, Amit Shah wrote: BTW I don't really want

Re: [Qemu-devel] [PATCH 5/8] virtio-serial-bus: Add support for buffering guest output, throttling guests

2010-01-12 Thread Amit Shah
On (Tue) Jan 12 2010 [09:55:41], Anthony Liguori wrote: On 01/12/2010 09:49 AM, Amit Shah wrote: On (Tue) Jan 12 2010 [09:46:55], Anthony Liguori wrote: On 01/12/2010 09:13 AM, Amit Shah wrote: On (Tue) Jan 12 2010 [09:00:52], Anthony Liguori wrote: On 01/12/2010 01:16

Re: [Qemu-devel] [PATCH 5/8] virtio-serial-bus: Add support for buffering guest output, throttling guests

2010-01-11 Thread Amit Shah
On (Fri) Jan 08 2010 [13:35:03], Jamie Lokier wrote: Since VNC is clearly designed to work over TCP, and is written by people who know this, I'm wondering why you think it needs to be different for virtio-serial. For vnc putting stuff from a guest clipboard into vnc client clipboard using

Re: [Qemu-devel] [PATCH 5/8] virtio-serial-bus: Add support for buffering guest output, throttling guests

2010-01-11 Thread Amit Shah
On (Fri) Jan 08 2010 [10:26:59], Anthony Liguori wrote: On 01/08/2010 07:35 AM, Jamie Lokier wrote: Sometimes it looks like TCP is maintaining write boundaries, but it is just an artifact of its behaviour on many systems, and is not reliable even on those systems where it seems to happen most

Re: [Qemu-devel] [PATCH 5/8] virtio-serial-bus: Add support for buffering guest output, throttling guests

2010-01-11 Thread Jamie Lokier
Amit Shah wrote: On (Fri) Jan 08 2010 [13:35:03], Jamie Lokier wrote: Since VNC is clearly designed to work over TCP, and is written by people who know this, I'm wondering why you think it needs to be different for virtio-serial. For vnc putting stuff from a guest clipboard into vnc

Re: [Qemu-devel] [PATCH 5/8] virtio-serial-bus: Add support for buffering guest output, throttling guests

2010-01-11 Thread Amit Shah
On (Mon) Jan 11 2010 [10:45:53], Jamie Lokier wrote: Amit Shah wrote: On (Fri) Jan 08 2010 [13:35:03], Jamie Lokier wrote: Since VNC is clearly designed to work over TCP, and is written by people who know this, I'm wondering why you think it needs to be different for virtio-serial.

Re: [Qemu-devel] [PATCH 5/8] virtio-serial-bus: Add support for buffering guest output, throttling guests

2010-01-11 Thread Jamie Lokier
Amit Shah wrote: Are you talking about a VNC protocol command between qemu's VNC server and the user's VNC client, or a private protocol between the guest and qemu's VNC server? What happens is: 1. Guest puts something on its clipboard 2. An agent on the guest gets notified of new

Re: [Qemu-devel] [PATCH 5/8] virtio-serial-bus: Add support for buffering guest output, throttling guests

2010-01-11 Thread Anthony Liguori
On 01/11/2010 05:33 PM, Jamie Lokier wrote: Amit Shah wrote: Are you talking about a VNC protocol command between qemu's VNC server and the user's VNC client, or a private protocol between the guest and qemu's VNC server? What happens is: 1. Guest puts something on its clipboard

Re: [Qemu-devel] [PATCH 5/8] virtio-serial-bus: Add support for buffering guest output, throttling guests

2010-01-11 Thread Anthony Liguori
On 01/11/2010 02:39 AM, Amit Shah wrote: On (Fri) Jan 08 2010 [10:26:59], Anthony Liguori wrote: On 01/08/2010 07:35 AM, Jamie Lokier wrote: Sometimes it looks like TCP is maintaining write boundaries, but it is just an artifact of its behaviour on many systems, and is not reliable

Re: [Qemu-devel] [PATCH 5/8] virtio-serial-bus: Add support for buffering guest output, throttling guests

2010-01-11 Thread Amit Shah
On (Mon) Jan 11 2010 [18:28:52], Anthony Liguori wrote: I would think that any buffering should be pushed back to the guest. IOW, if there's available data from the char driver, but the guest doesn't have a buffer. Don't select on the char driver until the guest has a buffer available. If

Re: [Qemu-devel] [PATCH 5/8] virtio-serial-bus: Add support for buffering guest output, throttling guests

2010-01-11 Thread Amit Shah
On (Mon) Jan 11 2010 [23:33:56], Jamie Lokier wrote: Amit Shah wrote: Are you talking about a VNC protocol command between qemu's VNC server and the user's VNC client, or a private protocol between the guest and qemu's VNC server? What happens is: 1. Guest puts something on its

Re: [Qemu-devel] [PATCH 5/8] virtio-serial-bus: Add support for buffering guest output, throttling guests

2010-01-08 Thread Jamie Lokier
Amit Shah wrote: On (Fri) Jan 08 2010 [01:12:31], Jamie Lokier wrote: Amit Shah wrote: Guests send us one buffer at a time. Current guests send buffers sized 4K bytes. If guest userspace applications sent out 4K bytes in one write() syscall, the write request actually sends out

Re: [Qemu-devel] [PATCH 5/8] virtio-serial-bus: Add support for buffering guest output, throttling guests

2010-01-08 Thread Anthony Liguori
On 01/08/2010 07:35 AM, Jamie Lokier wrote: Sometimes it looks like TCP is maintaining write boundaries, but it is just an artifact of its behaviour on many systems, and is not reliable even on those systems where it seems to happen most of the time. Even when connecting to localhost, you

Re: [Qemu-devel] [PATCH 5/8] virtio-serial-bus: Add support for buffering guest output, throttling guests

2010-01-07 Thread Jamie Lokier
Amit Shah wrote: Guests send us one buffer at a time. Current guests send buffers sized 4K bytes. If guest userspace applications sent out 4K bytes in one write() syscall, the write request actually sends out multiple buffers, each of 4K in size. This usually isn't a problem but for some

Re: [Qemu-devel] [PATCH 5/8] virtio-serial-bus: Add support for buffering guest output, throttling guests

2010-01-07 Thread Amit Shah
On (Fri) Jan 08 2010 [01:12:31], Jamie Lokier wrote: Amit Shah wrote: Guests send us one buffer at a time. Current guests send buffers sized 4K bytes. If guest userspace applications sent out 4K bytes in one write() syscall, the write request actually sends out multiple buffers, each of

[Qemu-devel] [PATCH 5/8] virtio-serial-bus: Add support for buffering guest output, throttling guests

2010-01-06 Thread Amit Shah
Guests send us one buffer at a time. Current guests send buffers sized 4K bytes. If guest userspace applications sent out 4K bytes in one write() syscall, the write request actually sends out multiple buffers, each of 4K in size. This usually isn't a problem but for some apps, like VNC, the

[Qemu-devel] [PATCH 5/8] virtio-serial-bus: Add support for buffering guest output, throttling guests

2010-01-04 Thread Amit Shah
Guests send us one buffer at a time. Current guests send buffers sized 4K bytes. If guest userspace applications sent out 4K bytes in one write() syscall, the write request actually sends out multiple buffers, each of 4K in size. This usually isn't a problem but for some apps, like VNC, the

[Qemu-devel] [PATCH 5/8] virtio-serial-bus: Add support for buffering guest output, throttling guests

2009-12-23 Thread Amit Shah
Guests send us one buffer at a time. Current guests send buffers sized 4K bytes. If guest userspace applications sent out 4K bytes in one write() syscall, the write request actually sends out multiple buffers, each of 4K in size. This usually isn't a problem but for some apps, like VNC, the

Re: [Qemu-devel] [PATCH 5/8] virtio-serial-bus: Add support for buffering guest output, throttling guests

2009-12-23 Thread Anthony Liguori
On 12/23/2009 01:52 PM, Amit Shah wrote: Guests send us one buffer at a time. Current guests send buffers sized 4K bytes. If guest userspace applications sent out 4K bytes in one write() syscall, the write request actually sends out multiple buffers, each of 4K in size. This usually isn't a