Re: P4 compile options

From: Dave Jones (davej@codemonkey.org.uk)
Date: Fri Nov 22 2002 - 05:54:38 EST


On Fri, Nov 22, 2002 at 01:04:39PM -0200, Denis Vlasenko wrote:

> I consider 16-byte code alignment as way too big.
> P4 zealots can demand even more I guess :(
> I will happily change my mind when/if I'll see
> favorable speed/kernel size benchmarks. Until then,

I think there's a misunderstanding here.
The march=pentium4 option is only used when you select
"build me a pentium 4 kernel" You do realise that right?
Generic kernels don't change 1 bit.

> I think 4-byte alignment is closest to sanity.

You know where to find the Intel P4 optimisation manuals..

> Not exactly P4 related but: if you tell gcc your
> processor has cmov, gcc will try to use it.

So what ? Show me a P4 without cmov.

> Results:
> * gcc code is worse with cmov than without
> * some CPUs (Cyrix?) have slow cmovs (microcoded?)
> * you lose whenever you try to use your code
> on cmov-less CPU.

  <------------ The point.
                              --------------> You.

Cmov is completely irrelevant here.
Sure its still an optional instruction which
should be tested for before use, but until Intel
make a P4 without CMOV, adding march=pentium4
is harmless.
 
> Dave, I am absolutely sure _you_ do not compile
> for P4 needlessly, but lots of ordinary people
> do that just to be hip.

Those are probably the same folks who run Gentoo/Slackware/ or
some-other-compile-everything-myself-because-I've-too-much-time-on-my-hands-distro.
Fine, let them be happy.
If some loon wants a P4 optimised /bin/ls, that's his problem,
but optimisation of key components (like say, the kernel) _is_
important.

> I wanted to point out why it may be undesirable.

All you've pointed out is that a P4 kernel won't run
optimally on a 486. Well surprise, it won't run at all.

                Dave

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



This archive was generated by hypermail 2b29 : Sat Nov 23 2002 - 22:00:39 EST