FreeCalypso > hg > freecalypso-tools
changeset 619:f82551c77e58
libserial-newlnx: ASYNC_LOW_LATENCY patch reverted
Reports from Das Signal indicate that loadtools performance on Debian
is about the same as on Slackware, and that including or omitting the
ASYNC_LOW_LATENCY patch from Serg makes no difference. Because the
patch in question does not appear to be necessary, it is being reverted
until and unless someone other than Serg reports an actual real-world
system on which loadtools operation times are slowed compared to the
Mother's Slackware reference and on which Slackware-like performance
can be restored by setting the ASYNC_LOW_LATENCY flag.
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Thu, 27 Feb 2020 01:09:48 +0000 |
parents | 6824c4d55848 |
children | dd162a4cb9fa |
files | libserial-newlnx/openport.c |
diffstat | 1 files changed, 0 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/libserial-newlnx/openport.c Tue Feb 25 18:40:00 2020 +0000 +++ b/libserial-newlnx/openport.c Thu Feb 27 01:09:48 2020 +0000 @@ -5,7 +5,6 @@ #include <sys/types.h> #include <sys/file.h> #include <sys/ioctl.h> -#include <linux/serial.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> @@ -15,25 +14,11 @@ open_serial_port(ttyport) char *ttyport; { - struct serial_struct kernel_serial_settings; - target_fd = open(ttyport, O_RDWR|O_NONBLOCK); if (target_fd < 0) { perror(ttyport); exit(1); } ioctl(target_fd, TIOCEXCL); - /* - * It appears that some miscreants have modified recent Linux kernel - * versions (newer than linux-4.4.14 of Slackware 14.2) to insert - * a delay of 10 ms before select system call returns when serial - * input is ready; this Linux kernel misbehaviour majorly slows down - * many of our operations. It appears that we need to set the - * ASYNC_LOW_LATENCY flag in TIOCSSERIAL in order to get the old - * sane behaviour back. - */ - ioctl(target_fd, TIOCGSERIAL, &kernel_serial_settings); - kernel_serial_settings.flags |= ASYNC_LOW_LATENCY; - ioctl(target_fd, TIOCSSERIAL, &kernel_serial_settings); return 0; }