Re: P4 compile options

Denis Vlasenko (vda@port.imtp.ilyichevsk.odessa.ua)
Sun, 24 Nov 2002 14:52:28 -0200


On 22 November 2002 08:54, Dave Jones wrote:
> 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.

I find it's far too easy for me to talk on lkml than
to do something useful... I'll try to *not* reply next time :)

Let's start from the start.
This is an original message which started this thread:

On 21 November 2002 18:18, Margit Schubert-While wrote:
> Maybe a dumb question -
> Is it possible to use the "-march=pentium4 -mfpmath=sse -msse2"
> options for a P4 ?
> I notice anything over a P2 just gets "-march=i686".

It sounds like: "I've got a P4, I want my kernel use each and every P4ism
possible. I want. I want. I want. How to do it?" (a bit exagerrated :)

An important question is missing here: is a particular P4ism useful?
It is ok to use P4isms *if* one is sure they lead to better kernel.

What -mfpmath=sse or -msse2 will give us? Probably nothing since kernel
do not use fp (well, almost). And if it would use 'em, use of sse2 can
*slow down* context switch. I'm not sure, but _it needs testing_ before
we "optimize" kernel with such options.

Margit Schubert-While <margitsw@t-online.de> has an excellent opportunity
to compile a handful of kernels, run, say, contest with them and report
his findings. ;)

--
vda
-
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/