tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kmem change related trouble
On Fri, 3 Feb 2012, Lars Heidieker wrote:
> On Fri, Feb 3, 2012 at 6:49 PM, Eduardo Horvath <eeh%netbsd.org@localhost>
> wrote:
> > On Fri, 3 Feb 2012, Lars Heidieker wrote:
> >
> >> The code for proper kmem_arena sizing:
> >> http://www.netbsd.org/~para/kmemsizing.diff
> >>
> >> params done for i386/amd64/sparc64/arm32
> >
> > Explain this to me:
> >
> > /*
> > - * Minimum and maximum sizes of the kernel malloc arena in
> > PAGE_SIZE-sized
> > + * Minimum size of the kernel kmem_arena in PAGE_SIZE-sized
> > * logical pages.
> > + * No enforced maximum on sparc64.
> > */
> > -#define NKMEMPAGES_MIN_DEFAULT ((6 * 1024 * 1024) >> PAGE_SHIFT)
> > -#define NKMEMPAGES_MAX_DEFAULT ((128 * 1024 * 1024) >>
> > PAGE_SHIFT)
> > +#define NKMEMPAGES_MIN_DEFAULT ((64 * 1024 * 1024) >> PAGE_SHIFT)
> > +#define NKMEMPAGES_MAX_UNLIMITED 1
> >
> >
> > Does this mean a machine needs to allocate a minimum of 64MB for the
> > kernel kmem_arena or it won't boot? What happens if a machine only has
> > 64MB of DRAM?
> >
>
> It's not about physcial memory, it's sizing the kmem_arenas virtual size.
> It is sized by physical memory size as an aproximation, with a certain
> lower limit and if required an upper bound.
> The upper bound is only required on archs that have limited kernel
> virtual memory space (in comparison to physical memory) eg i386 as 1GB
> virtual memory kernel space but probably 2-3GB physcial memory. So the
> kmem_arena is the limited to 280MB to leave space for other maps uares
> buffers.
Interesting, but it didn't really answer the question. Will it attempt to
allocate NKMEMPAGES_MIN_DEFAULT pages on startup? Will this break
machines with 64MB of RAM? 'Cause I don't think that's something we want
to do.
Eduardo
Home |
Main Index |
Thread Index |
Old Index