-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[cmds] Ktcp enhancements and various small cleanups #592
Conversation
The new Generally, this (already merged) PR gives some benefit and addresses the matter of this ticket, yet underlying issue of interrupt-driven serial communication remains. |
Those changes will help, they don't change the serial port directly but allow larger data counts per read to be passed back to ktcp.
It appears your original issue is not solved. Did this fix allow your system to work faster than 300 baud? I am interested in results of any improvement. The kernel will now display serial overruns, so that is not apparently your problem.
Good to know. I will be able to debug sh vs login when I am able to get QEMU setup for networking, I need help on that.
I see. Did this not work at 300 baud either?
Thanks. Agreed. How do we know that your system UART chip in fact works correctly? Does this repeat on other machines? I'm sorry if you've already explained, but am just wondering about hardware possibilities at this point. We haven't got the full test results from @Mellvik on the improved |
Nah, it was possible before to go as fast as 4800bps, but the quality of service was deteriorating with growing speed. It's just that 300bps allows to sustain established telnet communication for longer. Note that many times it was just a matter of luck how long the communication worked before stalled, and this didn't change. The only improvement I see is that deterioration (at faster speeds) less often cause the system to hang and even with connection stuck, it's still keyboard-responsible.
It works on FreeDOS at all speeds available. I'm either redirecting FreeDOS console to serial (using |
So previous to all the serial mods in the last weeks, it worked better? Dang!
The recent changes have helped the system in general, I think, and are needed for higher throughput. But none of these changes seem related to the core issue with your machine.
Great news, its a software problem! :) Time to look at the FreeDOS serial driver.
Oh. Maybe it isn't a software only problem - hardware flow control is needed for high speeds on your machine? We'll wait for @Mellvik's driver, since I don't (yet) have hardware to easily test with. Can you confirm that you get high-speed data INPUT on FreeDOS without using the hardware null-modem cable? We're not using interrupt-driven serial output (yet). Thanks for your testing! |
I don't think it's the right stuff to examine. DOS serial port is hard to deal with (even its 'mode' command to configure communication parameters doesn't expose all the options both Telix and HyperTerminal have). Most of the DOS programs talk to the hardware directly (bypassing DOS) and have ability to provide ioports and IRQ.
As I said, I don't have any other null-modem cable. Yet I managed to do some test with a DOS software that definitely can't handle hardware flow control. Up to speed 2400bps it's fine and stable. At 4800bps the inbound traffic (a longer piece of text pasted to |
IMO the serial driver may not be the primary culprit here. During my extensive testing over the past weeks, I have noticed (and some times reported) a system hang situation that severely affect serial reliability. More than half of the time when I dump my 12kb test file onto the serial line, one buffer (512b) or less actually make it to the destination file. The line speed makes a difference, but not much.
With the current serial driver and what I like to call normal system activity, ELKS should easily handle 2400 bps w/o character loss even if there is no flow control, probably 4800 too. [Remember - with careful preparation(!) and no disturbances (whatever that is), we're able to get all of 12k through - w/only 12 characters lost. BTW - that is 12 characters every time, one per KB.]
So while continuing the work on serial improvements, I think we need to be on the outlook for 'the other culprit'. I have no idea where to look. It is quite possible that The new sercat tool will help narrow it down.
I plan to start working on the flow control issues toward the end of the week - possibly starting with soft flow control (XON/XOFF). In the meanwhile I'll be mostly offline.
Apropos drivers to look at - Minix 2 seems like a good place to start.
…-M
Time to look at the FreeDOS serial driver.
I don't think it's the right stuff to examine. DOS serial port is hard to deal with (even its 'mode' command to configure communication parameters doesn't expose all the options both Telix and HyperTerminal have). Most of the programs talk to the hardware directly and have ability to provide ioports and IRQ.
Can you confirm that you get high-speed data INPUT on FreeDOS without using the hardware null-modem cable? We're not using interrupt-driven serial output (yet).
As I said, I don't have any other null-modem cable. Yet I managed to do some test with a DOS software that definitely can't handle hardware flow control. Up to speed 2400bps it's fine and stable. At 4800bps the inbound traffic (a longer piece of text pasted to minicom on the Linux side) started to suffer from minor character loses. That only confirms, not using hardware flow control is a bad idea...
—
|
Add '-s baudrate' option to
ktcp
, requested in #539. Modified /etc/rc.d/rc.sys, no need to runstty
separately beforehand anymore.Set new VMIN/VTIME serial line parameters for
ktcp
slip testing for @pawosm-arm, from #515.Fixed lots of compiler warnings in ktcp, many more still there.
Add process ID to kernel
sys_brk
process out of memory errmsg, discussed off-topic in #586.Temporary change to
telnetd
to exec /bin/login rather than /bin/sh for @pawosm-arm testing.Quick one-line guess/fix to ash/mkinit.c to try to debug the occasional GitHub CI build errors that are seen just after merges/push to GitHub. This is the 'invalid character in file' that is generated and stops the build (see picture).