[PlanetCCRMA] Rebuilding kernel on FC6/CCRMA

Fernando Lopez-Lezcano nando@ccrma.Stanford.EDU
Sun Jun 10 17:47:00 2007


On Sun, 2007-06-10 at 11:40 +1200, Michael Curtis wrote:
> On Sun, 27 May 2007 08:51:07 Fernando Lopez-Lezcano wrote:
> 
> > The source packages live here:
> > http://ccrma.stanford.edu/planetccrma/mirror/all/linux/SRPMS/
> >
> > You should be able to rebuild the .src.rpm with (I think)
> >   rpmbuild -ba --target=i586 spec_file_name
> >
> > Sorry, I should start building i586 kernels again...
> 
> Thanks for that, Fernando.
> 
> Sorry for the late reply, but I did manage to rebuild the kernel for i586 and 
> it's working nicely.  I had to modify the kernel config for i586 (changed 
> i686 to i586 in the CPU selection) but otherwise it built fine.
> 
> I have had a problem with Jackd on this system however.  Typing 
> 	jackd -d <anydriver>
> results in Illegal Instruction.  Running jackd in the debugger shows that it's 
> the result of a cmov instruction (not supported by the C3 and "optional" 
> according to the Intel manuals).  I rebuilt the package about 10 times before 
> I worked out the right combination of flags. Currently, I managed to get it 
> to work with these configure flags:
>    --enable-dynsimd=no --enable-sse=no --enable-optimization-by-cpu --enable-optimize=no 
> and removing these compiler flags:
>     -msse -msse2 -m3dnow
> 
> I suspect that I can construct a more minmal case (suspect support for sse and 
> sse2 that need to be disabled), will experiment further later.  In the mean 
> time, hopefully this helps someone else with a C3.

Maybe the email below is relevant? Do you know if the C3 supports the
CPUID instruction? (although your exception occurs with a cmov
instruction). 

-- Fernando


-------- Forwarded Message --------
From: Jussi Laako <jussi@sonarnerd.net>
To: Free Ekanayaka <freee@debian.org>
Cc: jackit-devel@lists.sourceforge.net
Subject: Re: [Jackit-devel] Optimisation flags in the jackd Debian
package
Date: Sat, 02 Jun 2007 01:08:29 +0300

Free Ekanayaka wrote:
>  --enable-dynsimd=yes
> 
> if the architecture is amd64 (it has been disabled on i386 because
> apparently not every CPU supports it).

The whole point of this functionality is that CPUID instruction is used
to determine what capabilities the CPU has, at runtime, and to select
the used algorithm accordingly. So it should work on anything which
supports CPUID instruction (486 upwards?).

> CFLAGS += -m3dnow -msse

This isn't needed on lowend arch and if dynsimd is disabled.

When building with dynsimd, something like "-march=i686 -m3dnow -msse
-O3 -ffast-math -fomit-frame-pointer" could be used.

If you like to optimize it to the max, something like "-march=pentium4
-mtune=prescott -m3dnow -O3 -mfpmath=sse -ffast-math
-fomit-frame-pointer -funroll-loops -fprefetch-loop-arrays" would do
when arch is pentium4(or core)/athlon64 or better.

> However it seems that the use of --enable-sse=yes and -m3dnow -msse
> leads to problems on some i386 CPUs, see:

Obviously?

> How much impact has the use SSE and m3dnow in terms of performances? 
> Would it be acceptable to drop them in the Debian package in order to
> get a wider support of CPUs?

"dynsimd" is designed to give near-optimal performance on most
hardwares. Only requirement is that the CPU supports CPUID instruction.
I doubt if jack would make much sense on such ancient hardware which
wouldn't support CPUID (ie. pre-486).

> different binary packages, say jackd and jackd-noopt, one built with
> these optimisations and the other not. In that case should be also the

You should make a difference here between _runtime_ optimizations and
_compile_ time optimizations. Having the first one could probably make
sense to have in generic package (that's why it's there in first place),
second probably doesn't in order to be compatible with older hardware.


BR,

	- Jussi