On other platforms (for instance, SPARC), the gcc flag -nonstd may be set
that will implicitly disallow denormalizations for underflow conditions. I
believe there are other methods involving the use of SIGFPE (signals for the
floating point exception). However, I have yet to discover a method for use
on a Pentium platform for a rtlinux thread other than explicitly checking
the operands before performing a floating point multiplication.
Has anybody in the real time linux community found a clean solution for
avoiding the increase in execution time that occurs when an underflow is
handled?
Thank you in advance for your help.
Victor Iannello
Synchrony Inc.
----- Original Message -----
From: "David Olofson" <[EMAIL PROTECTED]>
To: "Victor Iannello" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, December 04, 2000 1:13 PM
Subject: Re: [rtl] Underflow Slowdown
> Mon, 04 Dec 2000 Victor Iannello wrote:
> > We have a periodic real time task that typically executes in about 40 us
on
> > a Pentium 266 MHz processor. We find that when the calculation results
in
> > one or more underflows, the execution time may increase to 60 us or more
due
> > to denormalization of the floating point numbers. We can avoid this by
> > checking the operands of the floating point multiplication before
performing
> > the multiplication, but we would prefer that this is handled implicitly.
Is
> > there a compiler flag or other method that can be used to set small
numbers
> > to zero rather than the slower, gradual underflow?
>
> I *think* I just got some information that indicates that the slowdown is
due
> to the denormalization being handled by an exception. In user space, you
just
> have to disable that exception to avoid the problem.
>
> However, first, I might be mixing this up with other platforms (PPC also
suffer
> from denormalization overhead - well known problem among audio plugin
> programmers), and second, I don't know how this would apply to kernel
space
> code. (IIRC, the exceptions are turned off, as they would do nasty things
if
> triggered from kernel context. Might be missing something, though.)
>
>
> file://David
>
> ..- M A I A -------------------------------------------------.
> | Multimedia Application Integration Architecture |
> | A Free/Open Source Plugin API for Professional Multimedia |
> `----------------------> http://www.linuxaudiodev.com/maia -'
> ..- David Olofson -------------------------------------------.
> | Audio Hacker - Open Source Advocate - Singer - Songwriter |
> `--------------------------------------> [EMAIL PROTECTED] -'
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/