|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] 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
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] about the network speed is too slow with vtd on Xen-3.2,
Zhang, Li <=
|
|
|
|
|