WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] about the network speed is too slow with vtd on Xen-3.2

To: "Zhang, Li" <li.zhang@xxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] about the network speed is too slow with vtd on Xen-3.2
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Mon, 16 Jun 2008 11:33:22 +0100
Delivery-date: Mon, 16 Jun 2008 03:34:04 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <14B8575781A1414FA0D4F6649C4D719001783065@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcjPm4dKLeB7n3geS6+A/ud2x1mNgAAAN8co
Thread-topic: [Xen-devel] about the network speed is too slow with vtd on Xen-3.2
User-agent: Microsoft-Entourage/11.4.0.080122
Have you considered not printing so much? After passthru is set up you
should only be logging on error conditions.

 -- Keir

On 16/6/08 11:27, "Zhang, Li" <li.zhang@xxxxxxxxx> wrote:

> Hi, Keir
> With 3.2-tree, if we assigned NIC to guest, we copy a file with 'scp'
> command. the speed shows only about 2M in 1000M LAN. It is because that
> when we add the guest_level, too many messages in the serial are
> printed. The patch 17509 of Xen unstable can be ported to this tree to
> fix it. 
> 
> diff -r b39b6ab402ee xen/drivers/char/serial.c
> --- a/xen/drivers/char/serial.c Fri Jun 13 13:59:22 2008 +0100
> +++ b/xen/drivers/char/serial.c Mon Jun 16 17:49:48 2008 +0800
> @@ -14,6 +14,9 @@
>  #include <xen/sched.h>
>  #include <xen/mm.h>
>  #include <xen/serial.h>
> +
> +/* Never drop characters, even if the async transmit buffer fills. */
> +/* #define SERIAL_NEVER_DROP_CHARS 1 */
>  
>  static struct serial_port com[2] = {
>      { .rx_lock = SPIN_LOCK_UNLOCKED, .tx_lock = SPIN_LOCK_UNLOCKED },
> @@ -81,22 +84,24 @@
>  
>  static void __serial_putc(struct serial_port *port, char c)
>  {
> -    int i;
> -
>      if ( (port->txbuf != NULL) && !port->sync )
>      {
>          /* Interrupt-driven (asynchronous) transmitter. */
> +#ifdef SERIAL_NEVER_DROP_CHARS
>          if ( (port->txbufp - port->txbufc) == SERIAL_TXBUFSZ )
>          {
> -            /* Buffer is full: we spin, but could alternatively drop
> chars. */
> +            /* Buffer is full: we spin waiting for space to appear */
> +            int i;
>              while ( !port->driver->tx_empty(port) )
>                  cpu_relax();
>              for ( i = 0; i < port->tx_fifo_size; i++ )
>                  port->driver->putc(
>                      port,
> port->txbuf[MASK_SERIAL_TXBUF_IDX(port->txbufc++)]);
>              port->txbuf[MASK_SERIAL_TXBUF_IDX(port->txbufp++)] = c;
> +            return;
>          }
> -        else if ( ((port->txbufp - port->txbufc) == 0) &&
> +#endif
> +        if ( ((port->txbufp - port->txbufc) == 0) &&
>                    port->driver->tx_empty(port) )
>          {
>              /* Buffer and UART FIFO are both empty. */
> 
> Thanks
> -Li
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel