RE: [patch]K6-2/K-III compile option

nathan.zook@amd.com
Thu, 30 Sep 1999 15:43:28 -0500


I did some checking. In general, the K6 (as opposed to the K6-2/K-III)
should optimize identically to a Pentium with MMX.

3DNow! instructions were introduced with the K6-2, so it would be an error
to enable them for the K6. I believe this patch has it right, but the
comment at the top of what is quoted suggests otherwise.

I also noted what appear to be differences between the options selected for
the Athlon and those recommended at http://aboutlinux.com/art_k7opt1_e.html.
I wanted to be certain that you were aware of his results, in case he
uncovered something extra.

These remarks are my own, based on a quick check and are NOT the voice of my
company.

Nathan

-----Original Message-----
From: Jeff Garzik [mailto:jgarzik@pobox.com]
Sent: Thursday, September 30, 1999 11:49 AM
To: Anders Fugmann
Cc: linux-kernel@vger.rutgers.edu; alan@redhat.com
Subject: Re: [patch]K6-2/K-III compile option

Anders Fugmann wrote:
> Jeff Garzik wrote:
> > I'm not sure CONFIG_X86_USE_3DNOW, which enables _MMX_ code, is a win on
> > all K6's. Wasn't the original K6 rather slow when doing MMX?
>
> I beleive that the plain K6 is slower using mmx routines, but the
> K6-2/K6-III should gain a bit.
> This is why the options is only for the K6-2/K6-III, as mentioned in
> Configure.help

Missed that, I skipped straight to the code :)

I think there is still room for improvement. '-march=k6' should be a
win on all K6's. Also, CONFIG_X86_USE_3DNOW is new and not necessarily
mature.

For those reasons I think that CONFIG_X86_USE_3DNOW should be an option,
not a feature auto-selected by config.in. That will allow users to
choose whether or not they want to use the new MMX routines.

if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
if [ "$CONFIG_MK6" = "y" -o "$CONFIG_MK7" = "y" ]; then
bool '3Dnow/MMX support routines' CONFIG_X86_USE_3DNOW
fi
fi

Take this with a grain of salt, Alan ignored a similar patchlet from me.

> BTW.
> in the file arch/i386/lib/usercopy.c there is a "#ifdef
> CONFIG_X86_USE_3DNOW_AND_WORKS"
> which enables some mmx routines. I cannot find any other references to
> "CONFIG_X86_USE_3DNOW_AND_WORKS".
> Do you have an idea why this variable is used or is it just a typo?
> Anyway... I've changed it to "#ifdef CONFIG_X86_USE_3DNOW", as you can
> se below.

This looked to me like the semantic equivalent of '#if 0'. I would not
remove "_AND_WORKS" without heavy testing on both K6 and K7.

> Also:
> To whom should I send this patch, for it to be merged into the kernel
> tree?

Until Linus gets back from vacation, Alan Cox <alan@redhat.com> is
temporarily Head Penguin.

Regards,

Jeff

-- 
Custom driver development	|    Never worry about theory as long
Open source programming		|    as the machinery does what it's
				|    supposed to do.  -- R. A. Heinlein

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

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