On Sat, Jul 28, 2001 at 03:24:53AM +1200, Chris Wedgwood wrote:
> On Fri, Jul 27, 2001 at 11:57:43AM +0400, Alexey Kuznetsov wrote:
>
> This happens after sum of rtts exceed ~4000 seconds.
> I.e. with rtt of 4 seconds after ~1000 samples.
>
> Seems, have to use long long to extend this. Sigh.
>
> Is float really that bad? It's not like your doing 50K or these per
> second...
Like others have noted, doing FP/MMX stuff in kernel needs saving, and
restoring a rather massive state dump - preserving lazy-FPU-save/restore!
If the cost of that work is worth the effort for the amount of FP/MMX
instructions done for whatever purpose, then by all means, do it.
Examples of this include, but are not limited into, MD RAID5 parity
calculation, and some copy-to/from-userspace routines, I think.
In normal operations the penalty of having to save also the FPU for
an interrupt is so severe (IRQ called things should be small and
fast!) that it makes no sense.
In "soft interrupts" a.k.a. "BH:s" things are somewhat different.
Also, in most cases what one needs are scaled integers, or "fractions"
with constant (and power of two) fractor. That gives you in essense
trivially things like 0.01 and 100.00 which you multiply, and get
(roughly) 1.0
And by the way, softmodems don't need to do DSP work in the interrupt.
The softmodems are (to my knowledge) just glorified full-duplex A/D-D/A
codecs with suitable accessories for connecting into the phone line.
All you need is to move the PCM samples to userspace softmodem program,
and you are done. The "softmodem" driver shrinks a lot, and most of
it moves into a daemon server process.
I do think that having *soundmodem* stuff in the kernel is an abomination,
and it should be pushed out into userspace. It will be trivial to push
decoded frames from "modem" to kernel (and reverse), of course.
Running the userspace DSP program in pre-emptive RT-priority and
doing it all locked into memory is a performance issue, and possibly
necessary, but definitely one won't need to do the DSP stuff in kernel.
> --cw
/Matti Aarnio
|