Skip to contentSkip to conversation

serial: don't waste space allocated for the tx buffer(s)

PATCH In review Jan Beulich 2 participants 2 messages Jul 26, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 serial: don't waste space allocated for the tx buffer(s)

We're allocating minimally a full page, so no reason to not also use all that space.

xen/drivers/char/serial.c +2 -2
@@ -483,8 +483,8 @@ void __init serial_async_transmit(struct
     BUG_ON(!port->driver->tx_empty);
     if ( port->txbuf != NULL )
         return;
-    if ( serial_txbufsz < 512 )
-        serial_txbufsz = 512;
+    if ( serial_txbufsz < PAGE_SIZE )
+        serial_txbufsz = PAGE_SIZE;
     while ( serial_txbufsz & (serial_txbufsz - 1) )
         serial_txbufsz &= serial_txbufsz - 1;
     port->txbuf = alloc_xenheap_pages(

serial: don't waste space allocated for the tx buffer(s)

We're allocating minimally a full page, so no reason to not also use all that space.

xen/drivers/char/serial.c +2 -2
@@ -483,8 +483,8 @@ void __init serial_async_transmit(struct
     BUG_ON(!port->driver->tx_empty);
     if ( port->txbuf != NULL )
         return;
-    if ( serial_txbufsz < 512 )
-        serial_txbufsz = 512;
+    if ( serial_txbufsz < PAGE_SIZE )
+        serial_txbufsz = PAGE_SIZE;
     while ( serial_txbufsz & (serial_txbufsz - 1) )
         serial_txbufsz &= serial_txbufsz - 1;
     port->txbuf = alloc_xenheap_pages(

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Jan Beulich

We're allocating minimally a full page, so no reason to not also use all that space.

Quoted 20 lines
xen/drivers/char/serial.c +2 -2
@@ -483,8 +483,8 @@ void __init serial_async_transmit(struct
     BUG_ON(!port->driver->tx_empty);
     if ( port->txbuf != NULL )
         return;
-    if ( serial_txbufsz < 512 )
-        serial_txbufsz = 512;
+    if ( serial_txbufsz < PAGE_SIZE )
+        serial_txbufsz = PAGE_SIZE;
     while ( serial_txbufsz & (serial_txbufsz - 1) )
         serial_txbufsz &= serial_txbufsz - 1;
     port->txbuf = alloc_xenheap_pages(

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel