All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] char: tcp: increase size of buffer that holds data to be sent out
@ 2009-11-02 16:29 Amit Shah
  2009-11-02 16:47 ` [Qemu-devel] " Amit Shah
  2009-11-02 16:52 ` [Qemu-devel] " Anthony Liguori
  0 siblings, 2 replies; 4+ messages in thread
From: Amit Shah @ 2009-11-02 16:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: Amit Shah

1k is too less; at least send out 4k of data from a chardev.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
---
 qemu-char.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/qemu-char.c b/qemu-char.c
index 0fd402c..34c0a63 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -1996,7 +1996,7 @@ static void tcp_chr_read(void *opaque)
 {
     CharDriverState *chr = opaque;
     TCPCharDriver *s = chr->opaque;
-    uint8_t buf[1024];
+    uint8_t buf[4096];
     int len, size;
 
     if (!s->connected || s->max_size <= 0)
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Qemu-devel] Re: [PATCH] char: tcp: increase size of buffer that holds data to be sent out
  2009-11-02 16:29 [Qemu-devel] [PATCH] char: tcp: increase size of buffer that holds data to be sent out Amit Shah
@ 2009-11-02 16:47 ` Amit Shah
  2009-11-02 16:52 ` [Qemu-devel] " Anthony Liguori
  1 sibling, 0 replies; 4+ messages in thread
From: Amit Shah @ 2009-11-02 16:47 UTC (permalink / raw)
  To: qemu-devel

On (Mon) Nov 02 2009 [21:59:58], Amit Shah wrote:
> 1k is too less; at least send out 4k of data from a chardev.

This one only touches unix/tcp sockets; the others use a 1k buffer as
well; I'll send a new patch that converts all the users to a consistent
buffer size.

> 
> Signed-off-by: Amit Shah <amit.shah@redhat.com>
> ---
>  qemu-char.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/qemu-char.c b/qemu-char.c
> index 0fd402c..34c0a63 100644
> --- a/qemu-char.c
> +++ b/qemu-char.c
> @@ -1996,7 +1996,7 @@ static void tcp_chr_read(void *opaque)
>  {
>      CharDriverState *chr = opaque;
>      TCPCharDriver *s = chr->opaque;
> -    uint8_t buf[1024];
> +    uint8_t buf[4096];
>      int len, size;
>  
>      if (!s->connected || s->max_size <= 0)
> -- 
> 1.6.2.5
> 

		Amit

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] char: tcp: increase size of buffer that holds data to be sent out
  2009-11-02 16:29 [Qemu-devel] [PATCH] char: tcp: increase size of buffer that holds data to be sent out Amit Shah
  2009-11-02 16:47 ` [Qemu-devel] " Amit Shah
@ 2009-11-02 16:52 ` Anthony Liguori
  2009-11-03  4:54   ` Amit Shah
  1 sibling, 1 reply; 4+ messages in thread
From: Anthony Liguori @ 2009-11-02 16:52 UTC (permalink / raw)
  To: Amit Shah; +Cc: qemu-devel

Amit Shah wrote:
> 1k is too less; at least send out 4k of data from a chardev.
>   

Why is 1k too small?

Regards,

Anthony Liguori

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] char: tcp: increase size of buffer that holds data to be sent out
  2009-11-02 16:52 ` [Qemu-devel] " Anthony Liguori
@ 2009-11-03  4:54   ` Amit Shah
  0 siblings, 0 replies; 4+ messages in thread
From: Amit Shah @ 2009-11-03  4:54 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: qemu-devel

On (Mon) Nov 02 2009 [10:52:02], Anthony Liguori wrote:
> Amit Shah wrote:
>> 1k is too less; at least send out 4k of data from a chardev.
>>   
>
> Why is 1k too small?

Definitely depends on the apps that pump in the data. If an app has data
to pump, it will keep pumping as much data as possible (eg, Linux
syscalls issue read / write requests for 32k bytes of data).

The char devices have a 'can_read' call to determine how much the
backend can accept.

We're artificially limiting to 1k in this code, even if the app can pump
and the backend can receive, resulting in multiple splits.

In the case of virtio, 4k is available if the guest is able to receive
data.

		Amit

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-11-03  4:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-02 16:29 [Qemu-devel] [PATCH] char: tcp: increase size of buffer that holds data to be sent out Amit Shah
2009-11-02 16:47 ` [Qemu-devel] " Amit Shah
2009-11-02 16:52 ` [Qemu-devel] " Anthony Liguori
2009-11-03  4:54   ` Amit Shah

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.