xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] serial: don't waste space allocated for the tx buffer(s)
@ 2012-07-26 15:05 Jan Beulich
  2012-07-26 15:29 ` Keir Fraser
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Beulich @ 2012-07-26 15:05 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 650 bytes --]

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

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/drivers/char/serial.c
+++ b/xen/drivers/char/serial.c
@@ -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(




[-- Attachment #2: serial-txbuf-page.patch --]
[-- Type: text/plain, Size: 704 bytes --]

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.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/drivers/char/serial.c
+++ b/xen/drivers/char/serial.c
@@ -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(

[-- Attachment #3: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

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

* Re: [PATCH] serial: don't waste space allocated for the tx buffer(s)
  2012-07-26 15:05 [PATCH] serial: don't waste space allocated for the tx buffer(s) Jan Beulich
@ 2012-07-26 15:29 ` Keir Fraser
  0 siblings, 0 replies; 2+ messages in thread
From: Keir Fraser @ 2012-07-26 15:29 UTC (permalink / raw)
  To: Jan Beulich, xen-devel

On 26/07/2012 16:05, "Jan Beulich" <JBeulich@suse.com> wrote:

> We're allocating minimally a full page, so no reason to not also use
> all that space.
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Acked-by: Keir Fraser <keir@xen.org>

> --- a/xen/drivers/char/serial.c
> +++ b/xen/drivers/char/serial.c
> @@ -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
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

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

end of thread, other threads:[~2012-07-26 15:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-26 15:05 [PATCH] serial: don't waste space allocated for the tx buffer(s) Jan Beulich
2012-07-26 15:29 ` Keir Fraser

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).