From owner-freebsd-hackers Thu Sep 10 21:09:43 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id VAA04436 for freebsd-hackers-outgoing; Thu, 10 Sep 1998 21:09:43 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from freedomnet.com (freedomnet.com [198.240.104.3]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id VAA04431 for ; Thu, 10 Sep 1998 21:09:38 -0700 (PDT) (envelope-from kbyanc@freedomnet.com) Received: from freedomnet.com (tech.freedomnet.com [198.240.104.20]) by freedomnet.com (8.8.7/8.8.7/antispam) with ESMTP id AAA15845 for ; Fri, 11 Sep 1998 00:04:37 -0400 (EDT) X-Envelope-To: Message-ID: <35F8A20E.7257F30E@freedomnet.com> Date: Fri, 11 Sep 1998 00:07:42 -0400 From: Kelly Yancey Organization: FreedomNet - http://www.freedomnet.com/ X-Mailer: Mozilla 4.05 [en] (Win95; I) MIME-Version: 1.0 To: freebsd-hackers@FreeBSD.ORG Subject: New AMD processor support patch Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi all, Apparently I made a little faux-pa (sorry, I don't actually know french :) ) 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 :( 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. 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. " 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 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 If there is any interest I would like to add a cpu feature check for the AMD 3DNow! instructions. Kelly Yancey ~kbyanc@freedomnet.com~ (Thanks John for helping realize what I had done! :) ) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message