Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Sep 1998 14:42:22 +0930
From:      Greg Lehey <grog@lemis.com>
To:        Kelly Yancey <kbyanc@freedomnet.com>, freebsd-hackers@FreeBSD.ORG
Subject:   Re: New AMD processor support patch
Message-ID:  <19980911144222.N611@freebie.lemis.com>
In-Reply-To: <35F8A20E.7257F30E@freedomnet.com>; from Kelly Yancey on Fri, Sep 11, 1998 at 12:07:42AM -0400
References:  <35F8A20E.7257F30E@freedomnet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Friday, 11 September 1998 at  0:07:42 -0400, Kelly Yancey wrote:
> Hi all,
>
>   Apparently I made a little faux-pa (sorry, I don't actually know
> french :) )

faux pas ("false pace" or wrong step).

> back in April or so...I submitted a patch to add proper detection of
> the AMD CPU and the ability to enable the write allocate feature
> found on K5 and K6 CPUs. It just recently came to my attention that
> I uploaded the wrong patch :(

It looked pretty relevant to me.

>   The only reason I even noticed is that I mentioned to a friend of
> mine , John, that on the 1 system in my office that the feature
> worked on that it sped things up by about 10-15%. Next thing I know,
> I notice several people on this list are stating that the feature
> works seems to work on their system but that they aren't seeing any
> performance gain.

Yes, I was one of them.   I also had a good reason for the
discrepancy: if this feature would always be an improvement, it
wouldn't need to be an option.

> That is when it occurred to me that perhaps I didn't upload the correct
> patch (another version ANDed when it should have ORed and never actually
> turned on write allocate).
>   So, to make a long story short, here is the correct patch (I updated
> it to detect the new K6-2 processors too):
>   http://www.posi.net/software/public/freebsd/AMD_WT_ALLOC.patch
>
>   To enable write allocate support, add the following line to your
> kernel config (after applying the patches of course :) ):
>
> options		CPU_AMD_WT_ALLOC
>
>   Now, for the tricky part: write allocate does not work on all systems.
> AMD's K6 FAQ states:
> "  The write allocate utility is intended for development use only.
> Write allocate feature is supported for AMD-K6 processor in the
>    following BIOS revisions:
>
>      Award - Compile dates of March 1, 1997 or later
>      AMI - CPU Module 3.31 or later
>      Phoenix - Version 4.0
>      Release 6.0 or Release 5.1 w/build dates 4/7/97 or later.
> "

BIOSes are an idea in the mind of Microsoft.  We don't use them after
booting.

>   On my systems that do not work with write allocate I typically get
> messages from ahc0 complaining about RAM parity errors. So be prepared
> to fallback onto your kernel.old

Strange.  You'd expect it to have no effect at all.

>   Anyway, just in case your interested in why write allocate gives such
> great performance increases (when it works), AMD describes its function
> in their write allocate application note at:
>   http://www.amd.com/K6/k6docs/pdf/21326d.pdf

Yes, I read that.

>   If there is any interest I would like to add a cpu feature check for
> the AMD 3DNow! instructions.

I'm sure that would be of interest, though it doesn't affect my
processor.

I'm off to a conference for a week, but when I get back I'll try out
the patches (assuming nobody beats me to it) and report the results.

Greg
--
See complete headers for address, home page and phone numbers
finger grog@lemis.com for PGP public key

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980911144222.N611>