[KLUG Hardware] Win (Software) Modems

Adam Williams hardware@kalamazoolinux.org
29 Apr 2002 22:40:31 -0400


>>I've been told not to buy a Win Modem.  Which, after a small amount
>>of research, I've discovered appears to be a software modem.  So, I
>>can understand why, if I use Linux.
>Actually, Linux doesn't have that much to do with it, but good engineer-
>ing does. Regardless of OS, a "Win modem" is a loser in my book; you're
>using expensive CPU and memroy sycles to drive a process for which there
>is good hardware and DMA around already. The idea here is to offload the
>CPU, not merely from load, but from interrupt count. EVERY TIME a charac-
>ter arrives, or is sent, the driver generates an interrupt, which means
>that WHATEVER else is going on in the system will be stopped for a time
>(at least one, usually serval CPU cycles), some you DON'T want with todays

No way you ever get by with one CPU cycle.  The context switch itself
can be more that a dozen CPU instructions.  A heavy context switch loads
on an Intel (or AMD, whatever) will kill performance.  On an SMP box the
problem is flat out ridiculous,  where context switching can cause cache
misses and flushes,  which REALLY hurt.

>pipelined instruction CPU systems. You might counter that you've got a 
>lot of CPU speed to spare these days, but that's missing the point. It's
>not mere CPU time that's used to drive the "Lose Modem" that you're was-
>ting, but ADDITONAL interrupt and context switching time. While you will
>soak off 5-10% of your CPU in driving/simulating the modem, you lose MORE
>than that due to the other side effects.

And if the CPU lags behind you loose data, forcing re-transmissions.  So
not only is your computer slower, but your data transfer rates suffer
too. A $0.99 16550A UART solves the whole problem, these HSP devices are
simply ridiculous.