*BSD News Article 22329


Return to BSD News archive

Xref: sserve comp.os.386bsd.misc:1223 comp.os.linux:56179
Path: sserve!newshost.anu.edu.au!munnari.oz.au!constellation!osuunx.ucc.okstate.edu!moe.ksu.ksu.edu!vixen.cso.uiuc.edu!howland.reston.ans.net!sol.ctr.columbia.edu!news.kei.com!news.byu.edu!news.provo.novell.com!park.uvsc.edu!u.cc.utah.edu!cs.weber.edu!terry
From: terry@cs.weber.edu (A Wizard of Earth C)
Newsgroups: comp.os.386bsd.misc,comp.os.linux
Subject: Re: FYI.. benchmarks on linux and 386bsd
Date: 12 Oct 1993 04:33:16 GMT
Organization: Weber State University, Ogden, UT
Lines: 45
Message-ID: <29dc2c$gmn@u.cc.utah.edu>
References: <CEH3Dp.A7I@dragon.dsh.org> <1993Oct6.184325.11583@finbol.toppoint.de> <750282279.25432@minster.york.ac.uk>
NNTP-Posting-Host: cs.weber.edu

In article <750282279.25432@minster.york.ac.uk> al-b@minster.york.ac.uk writes:
[ ... ]
>The Tiny Bootdisk worked fine, but it always crashed when trying to access
>the HDD.  I have finally got the 386BSD binary distribution working, but I
>would not want to run any benchmarks with it... Why not?
>
>386BSD will only boot off the harddisk if the internal cache is disabled AND
>the external cache is disabled AND the turbo button is disabled.
>
>Linux runs at the full 66 MHz and is plenty fast for me, so I will probably
>get rid of 386BSD soon. Five minutes to boot from a SCSI disk just isn't on!
>Linux does it in under one minute (with all sorts of goodies in /etc/rc).
>(These times are roughly from the end of the selftest)

First, I'd suggest using either NetBSD or FreeBSD to get around most of
your problems.

Second, the problem with the cache is a pretty easy hack to fix; I'd be
suprised if it wasn't fixed already in NetBSD (I have a machine running
it, but haven't looked at the original sources in some time, and probably
won't before I send this article).  Basically, the "noncacheable" bit is
not set on paged being DMA'ed to by device initiated DMA.  Set the bit on
the buffer pages, and the problem goes away.  10 lines of code in the
init code for the bounce buffers, if you are interested.

The problem is "apparently" fixed in the last SCSI driver set for NetBSD
and FreeBSD (ie: it could be fixed both places, so don't flame me 8-)).
The fix is the BINVD in the SCSI driver.

Other DMA devices will have similar problems without their own BINVD, and
since BINVD is expensive and doesn't work with some L2 caches on boards
with shitty chip sets, the non-cacheable bit is a much better fix (as well
as being "the right way to do it").

Unfortunately, I'm not in a position to provide patches, or I would.

Needless to say, if you *have to* run in non-turbo with caches disabled,
then you are definitely running old code.


					Terry Lambert
					terry@icarus.weber.edu
---
Any opinions in this posting are my own and not those of my present
or previous employers.