Subject: Re: Sparseness of kernel structures on i386?
To: None <tls@rek.tjls.com>
From: Chris G Demetriou <Chris_G_Demetriou@auchentoshan.pdl.cs.cmu.edu>
List: port-i386
Date: 12/08/1996 12:45:09
> Let's say you have a machine with 128MB of memory.  That machine ends up with
> NKPDE = 32; KPDE_BASE (1) + KPDE_MAX (31).  That's 32 * 16MB or 512MB of space
> for kernel maps.  An eighth of the total amount of memory the machine can
> address at all, in fact.

You've misunderstood the way nkpde is set.

It's min(NKPDE_BASE + NKPDE_SCALE(# of MB of extended memory), NKPDE_MAX).

It is not, and apparently cannot be, more than 31.  (I asked charles,
that was his answer, i don't know why it's 31 as opposed to 32, which
is what i'd expect based on the fact that the kernel currently lives
in 128MB of virtual space at the top of the i386's virtual address
range.)

I think you _might_ be able to increase NKPDE, but if you do it won't
have any effect until the kernel is moved to a lower address.



> That machine gets, by the current algorithm, bufpages = nbuf = 1716.  So it
> tries to allocate 1716 * 64K or 112,459,776 bytes of memory.  Well, that's
> quite a bit more than it needs, but it ought to fit into 512MB just fine.

Right, now that you know your 512M calculation is off by a factor of
4, it becomes much more obvious why you're running out of space, eh?
8-)



chris