From: "Taku Izumi" <izumi2005@soft.fujitsu.com>
To: linux-kernel@vger.kernel.org
Cc: "Russell King" <rmk@arm.linux.org.uk>
Subject: [Patch] Peformance improvement of serial console via virtual serial port
Date: Tue, 6 Sep 2005 11:09:40 +0900 (JST) [thread overview]
Message-ID: <3445.10.124.102.246.1125972580.squirrel@dominion> (raw)
Greetings.
This patch improves peformance of serial console by using FIFO.
I think original serial driver is not effective, but transfer rate of
real serial port is low, so this problem has not been exposed.
However, because transfer rate of virtual serial port (ex. Serial Over
Ethernet)
is higher than that of real serial port, this problem is exposed.
The output performance via virtual serial port is still low by using original
serial driver. I think original serial driver becomes bottoleneck.
Taku Izumi <izumi2005@soft.fujitsu.com>
----------patch-------->8----------------------------------------
diff -Npur linux-2.6.9.org/drivers/serial/8250.c
linux-2.6.9/drivers/serial/8250.c
--- linux-2.6.9.org/drivers/serial/8250.c 2005-08-08
11:17:38.556373366 +0900
+++ linux-2.6.9/drivers/serial/8250.c 2005-08-08 11:41:03.759131389 +0900
@@ -1943,18 +1943,33 @@ serial8250_console_write(struct console
/*
* Now, do each character
*/
- for (i = 0; i < count; i++, s++) {
- wait_for_xmitr(up);
+ for (i = 0; i < count; ) {
+ int fifo ;
+ wait_for_xmitr(up);
+ fifo = up->tx_loadsz ;
/*
- * Send the character out.
+ * Send the character out using FIFO.
* If a LF, also do CR...
*/
- serial_out(up, UART_TX, *s);
- if (*s == 10) {
- wait_for_xmitr(up);
- serial_out(up, UART_TX, 13);
- }
+ do {
+ serial_out(up, UART_TX, *s);
+ fifo-- ;
+ if (*s == 10) {
+ if (fifo > 0) {
+ serial_out(up, UART_TX, 13);
+ fifo--;
+ } else {
+ /* No room to add CR */
+ wait_for_xmitr(up);
+ fifo = up->tx_loadsz ;
+ serial_out(up, UART_TX, 13);
+ fifo--;
+ }
+ }
+ i++ ;
+ s++ ;
+ } while (fifo > 0 && i < count ) ;
}
/*
----------------------------------------------------------------------
reply other threads:[~2005-09-06 2:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3445.10.124.102.246.1125972580.squirrel@dominion \
--to=izumi2005@soft.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rmk@arm.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®