Re: 2.4.x vs 2.6.x: denormal handling and audio performance

From: Fernando Pablo Lopez-Lezcano
Date: Mon Aug 09 2004 - 21:37:38 EST


On Mon, 2004-08-09 at 18:00, Lee Revell wrote:
> On Mon, 2004-08-09 at 15:19, Fernando Pablo Lopez-Lezcano wrote:
> > Hi all, I've been trying to track weird behavior I'm experiencing when
> > trying to use 2.6.x for "pro audio" applications and I think I have
> > something to report (and some questions).
> >
> > First, the environment. I'm running the Jack low latency server on top
> > of two different software installs on the same hardware, one is FC1 +
> > 2.4.26 + low latency and preemption patches, the other is FC2 + 2.6.7
> > rc2-mm2 + voluntary preemption O3. They are different hard disks swapped
> > into the same P4 laptop. Both are running the same source code versions
> > of all the audio programs that I use to test (but _not_ the same
> > binaries, each one is built in the environment it runs on).
>
> Have you tried using the exact same binaries under both 2.4 and 2.6?
> This would rule out a compiler issue.

I finally managed to boot the 2.6 kernel on top of FC1, but I can't run
jack with realtime priority, somehow the kernel is not happy with
something in the system, some jack client applications just hang.

Anyway, running under 2.6 without realtime makes the numbers fluctuate a
lot more but I see the same effect. After a while freqtweak samples
decay to close to zero and it starts using a lot of cpu. Starting
hydrogen again (the drum machine feeding freqtweak in my tests)
immediately solves the problem.

[some time later]

_BUT_

[frantically trying to find a big brown bag to hide in... sigh...]

I retested with 2.4.x under FC1 yet again and I do see the same
effect... argh... [*]

> In case anyone thinks this is an application bug, here are some links
> pertaining to the P4 denormals-are-zero issue, these were at the bottom
> of Fernando's post:
>
> http://gcc.gnu.org/ml/gcc/2001-07/msg02162.html
> http://lkml.org/lkml/2003/5/9/144

So, this is good in a way. I've been trying to find some code snippet
that would enable me to change the DAZ flag in MXCSR, without luck so
far... I know this is probably OT but would anyone out there know how to
do this, or where to find useful information?

-- Fernando

[*] the test conditions in my two systems were not _exactly_ the same (I
should know by now that is bad), so that in the FC1 case the decay into
denormals was taking a lot longer. I have to learn to be more patient.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/