Re: 80386 support in -current

From: Bruce Evans <bde_at_zeta.org.au>
Date: Mon, 26 Jan 2004 14:24:31 +1100 (EST)
On Mon, 26 Jan 2004, Peter Jeremy wrote:

> On Mon, Jan 26, 2004 at 07:37:48AM +1000, Andy Farkas wrote:
> ...
> I remember one thread on this subject but don't recall if it was that
> one.  As I recall, the agreed outcome went something like drop 80386
> support from GENERIC but retain it primarily for embedded applications.
>
> >%%%
> >Poul-Henning Kamp <phk_at_FreeBSD.ORG> wrote:
> >
> >My main concern would be if the chips have the necessary "umphf"
> >to actually do a real-world job once they're done running all the
> >overhead of 5.0-R.  The lack of cmpxchg8 makes the locking horribly
> >expensive.
> >%%%

Actually, cmpxchg8 isn't used for locking (except now in the PAE case),
and the benchmark that I gave in previous mail overestimated the cost
of the I386_CPU locking, so the lack of cmpxchg has little effect on
the cost of the locking (cli/sti are relatively fast instructions on
i386's (3 cycles each, and the fastest instructions take 2 cycles)).

> Note that cmpxchg8 doesn't exist in 486 either and is only necessary
> to support 8-byte atomic operations - I may be wrong but it should be
> possible to handle i386 locking with only 4-byte operations.  Of
> course, the 80386 doesn't have cmpxchg either, which _does_ make
> locking horrible (requires sti/cli which doesn't work in the multi-
> master case).

8-byte atomic operations aren't supported or used yet, except for loading
and storing pte's in the PAE case.  i386's and i486's don't have PAE so
the unconditional use of cmpxchg8 is not a problem.

> >This last point is the clincher. The chip does NOT have enough "umphf". I
> >actually managed to boot a -current (from back then) on a 80386SX and it
> >was torturously slow. An ls(1) on my empty home directory took 15 seconds.
> >My VAX is faster.
>
> This is a bug in FreeBSD 5.x - the performance in general has degraded
> since 4.x.  Performance degradation is often more obvious in lower end
> machines.

Developers should only have old machines so that performance doesn't
degrade :-).

Bruce
Received on Sun Jan 25 2004 - 18:24:37 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:39 UTC