Eliminate excessive CPU consumption when redirecting UART over SSH
Redirecting the external UART via SSH caused the console-server,
console-client, and dropbear to consume ~30% of the available CPU each
when a large amount of data was being written to the UART output.
Buffering all of the small 16550 FIFO bytes into a larger packet and
then sending that to the SSH SW allows more efficient transmission
over the ethernet connection.
Tested this by "ssh root@<bmc.ip.addr> -p 2200" on a system running a
CentOS distribution. Using a BASH console run a large binary file
through "od -t x1 <fname>" to create a large amount of traffic. At
the BMC console run "top" to review the CPU usage. My experience is
after this change is applied:
console-server: ~25% CPU
dropbear: ~3% CPU
console-client: ~1% CPU
Change-Id: Ibabfd285e97a487e7ff040e1cb3159fbff360328
Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
diff --git a/Makefile.am b/Makefile.am
index f61fddf..059ac1b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -18,7 +18,7 @@
tty-handler.c \
console-socket.c
-obmc_console_server_LDFLAGS = $(SYSTEMD_LIBS)
+obmc_console_server_LDFLAGS = $(SYSTEMD_LIBS) -lrt
obmc_console_server_CFLAGS = $(SYSTEMD_CFLAGS)
obmc_console_client_SOURCES = \