Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Sep 1998 14:58:42 -0400
From:      Kelly Yancey <kbyanc@freedomnet.com>
To:        Greg Lehey <grog@lemis.com>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: New AMD processor support patch
Message-ID:  <35F972E2.98CCB56A@freedomnet.com>
References:  <35F8A20E.7257F30E@freedomnet.com> <19980911144222.N611@freebie.lemis.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Greg Lehey wrote:
> 
> 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).

  I'll have to remember that :)

> 
> > 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.

  I had accidently posted a previous version that ANDed instead of ORed
and therefor didn't actually enable write allocate. 

> 
> >   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
> > 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.

  Well, it is not always an improvement...it doesn't seem to even work
on some motherboards.
On the one system in my office on which it did work, I recall seeing a
10-15% performance increase.

> 
> > 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.

  Yeah, actually their web site used to state that it only worked on
certain motherboards. Now it says certain BIOSes which struck me as odd.
I figured that perhaps they new that only motherboards which could
handle write allocate shipped with those bioses and rather than listing
all the motherboards they just listed the bioses. Admittingly some
round-about logic :)
  I don't understand, though, why write allocate doesn't always work
despite the motherboard. From reading their application note, it would
seem to me that there is no reason the motherboard should even notice
anything out of the ordinary. But I assure you, on all but the one
system, my ahc0 device goes nuts when write allocate is enabled. This
may not affect most people though (all the computers in my office
running FreeBSD are servers with Adaptec 2940UW controllers).

> 
> >   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.
> 

  Thanks, I'm looking for some feedback. I know how long it takes to get
a lot of these minor changes into the distribution. It is nice to know
when the work was not for nothing.

  Kelly Yancey
 ~kbyanc@freedomnet.com~

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?35F972E2.98CCB56A>