Subject: Re: Food for thought.
To: Chris Gilbert <chris@buzzbee.freeserve.co.uk>
From: Stephen Borrill <netbsd@precedence.co.uk>
List: port-arm32
Date: 01/10/2001 09:03:44
On Tue, 9 Jan 2001, Chris Gilbert wrote:
> On Tuesday 09 January 2001 9:41 am, Stephen Borrill wrote:
> > How about getting the L1 page table stuff sorted once and for all (with
> > dynamic allocation)?
>
> Anyone any ideas on this? (I need to read up on what the L1 pages do (beyond
> being that all process need them :)
It's been under discussion on and off since the 1.1 days and the start of
the arm32 port. I could be way wrong on this, but my understanding is that
the L1 (i.e. primary) page tables each hold the mappings for the rest of
the memory space for a process. They are 16k each. On arm32, a number are
statically allocated at boot time with either a kernel option
(PMAP_STATIC_L1S) or with a maxproc option at boot time (the former taking
precedence). I believe that there is some attempt at dynamic allocation
beyond this, but as the physical memory needs to be contiguous (16k - 4 4k
pages), allocation is usually unsuccessful and therefore the machine runs
out of L1 tables. This means the machine deadlocks waiting for a process
to terminate before a new one can start. In addition, settings
PMAP_STATIC_L1S too high cause the machine to fail to boot up (I believe
256 is sufficient to stop the CATS, though I've not tried recently). The
upshot of this is that you can only run about 200 processes at once on
arm32. Thus it's pretty useless for running something like Apache where
there is a fork for each request.
Now, as to how you fix it...
> > As part of that, I would like to see Linux compatability.
>
> Not sure if we can do that (Linux compatability is a strange beast, that and
> I don't even know if you can install both linux and netbsd at the same time :)
I'm probably missing what the smiley indicates, but what has a dual
installation got to do with it? AFAIK, you've got wrappers for Linux
syscalls in /usr/src/sys/compat/linux (and some specifics in
/usr/src/sys/compat/linux/arch/arm32). Then you've got a pared down Linux
disc image in /emul/linux (including /lib, /dev, etc). It works a treat on
i386 (even better with 1.5, you can run large things like StarOffice).
--
Stephen