[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: "Zhang, Li" <li.zhang@xxxxxxxxx>
  • Date: Mon, 16 Jun 2008 18:27:07 +0800
  • Delivery-date: Mon, 16 Jun 2008 03:27:36 -0700
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AcjPm4dKLeB7n3geS6+A/ud2x1mNgA==
  • Thread-topic: about the network speed is too slow with vtd on Xen-3.2

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.