Hi Frank,

On Sun, 6 Feb 2022, Frantisek Rysanek wrote:
On 6 Feb 2022 at 16:24, G.W. Haywood via Freedos-user wrote:
On Sun, 6 Feb 2022, Eric Auer wrote:

A quick thought... Given how fast modern CPU are relative to
serial ports, could you just set a periodic timer to poll
the status of all serial ports in case configuring their
interrupts on PCI is too tricky? And then let the poll
handler invoke your serial interrupt handlers when needed?

Thanks for the thought.  Frankly I don't know if the performance and
reliability of anything which tried to do it that way could ever be
acceptable but I doubt it.  In any, er, event it would need a lot more
development and testing (which would be prohibitive) than a rewrite of
the interrupt handling code.

Last time I tried, a single inb() or outb() on a parallel 32bit 33
MHz PCI would cost me... not sure if 500 ns is the correct number (or
was it 2 microseconds?)
How often does your dogwatch() routine run?

To the best of my knowledge it never has. :)  The way it would work is
if the terminals all stop responding I get a panic telephone call.  So
I tell the caller to press some combination of keys on the console and
let me know if that fixes it.  That's never happened.

What sort of response time do your terminal users expect? Such as the
echo time when typing characters.
The modern multiport PCI and PCI-e UARTs tend to have large FIFO
buffers, 64B per port or even more = there's hardly a chance of
losing keystrokes if you poll once per second, let alone every 50 ms
or so.

The interrupt-driven bits of code were tested for *years* before being
released and haven't changed for the last quarter of a century, during
which time a number of businesses have used the system from 8am to 6pm
five or six days a week to handle all their sales, some of them turning
over eight-digit sums of money annually.

The only time anyone ever found a mistake, it turned out that the
mistake had been made by someone keeping a manual accounting system
alongside it as a check in the first year.  Nobody does that any more.

I would view switching from interrupts to polling as a fundamental
change in the system.  Knowing what you now know, perhaps you can
imagine how keen I am to make fundamental changes to anything in a
system which is totally relied on and 100% trusted by its users, and
in any case I'm probably not going to live long enough to test such a
major change to my own satisfaction.

Please, let's not wander off the topic.  All I want to do is get an
interrupt to the right place.  A complete redesign of the serial port
handling code instead would be madness.  I don't even want to change
it just to hook a different interrupt, but I will if I have to.

--

73,
Ged.


_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to