On Sat, Sep 1, 2018 at 9:01 AM Larry McVoy <lm(a)mcvoy.com> wrote:
On Sat, Sep 01, 2018 at 12:43:52PM +0100, Steve Mynott
wrote:
On Wed, 29 Aug 2018 at 15:53, Larry McVoy
<lm(a)mcvoy.com> wrote:
The BSDs have a less than optimal VM system. Having SunOS opened up
would at least let people see what they are
missing. Maybe I have
rose colored glasses on but it was the only kernel that came into
focus for me and you could see the architecture from the code.
Everything else seems like a mess to me.
That may have been true in the late 80s and even early 90s but I'd have
thought FreeBSD, NetBSD and OpenBSD would have useable VMs by now.
I wandered through the FreeBSD VM recently. Perhaps I'm just old and
tired but it looked pretty messy to me. Still Mach based and the
Mach VM system, which came about at about the same time as the SunOS
VM system, doesn't remotely compare. Sun had some exceptional
talent at the time, there was a reason I fought hard to join that
group, I wanted to work with people who were better than me.
It is still technically mach based, but it's fixed most of the scalability
issues Mach had (and that MacOS still has).
There's much clutter in the VM, and there's areas that could stand to be
rewritten, or to get at least a good cleaning.
The SunOS vm was far superior in its day, and likely is still cleaner than
what's in FreeBSD. But it can't scale like FreeBSD's vm (or NetBSD's
or
even MacOS's) because it hasn't had the same care and feeding for the last
25 years. It's still single threaded and hasn't had the care and feeding to
make it perform well in MP situations. Solbourne spent years hacking it to
make it scale better, but even with 16 processors that was the high end for
them, and they were barely 10x faster than a uniprocessor for many work
loads due, in part, to vm contention limiting scalability. We had 2 8 CPU
machines that could build our software ~20% faster (with netmake) than the
1 16 CPU machine the OS group had, for example... I recall many discussions
with Dave Barak who did the fine-grained work on the 4.0 SunOS kernel
complaining about how many of the clever tricks in different subsystems
that worked great on UP were terrible for MP...
I don't doubt we'd be in an even better place today if we'd started with
the SunOS vm system in 4.4BSD rather than mach. Don't get me wrong. And
I'll not be the first in line to defend its elegance or clarity of design
(in fact, it has many design issues that took a decade to recode to
properly scale, and we're still not done). And lord knows even though I'm
not close to the foremost expert in the vm, I could easily put together an
hour or two talk on how all the areas of the VM that are holding us back.
Yet even with all that, I think that the ugly, warty, co-evolved code we
have in FreeBSD performs better than the SunOS vm code on any objective
benchmark you could have.
Warner