Subject: Re: ucred work
To: None <tech-kern@netbsd.org>
From: David Laight <david@l8s.co.uk>
List: tech-kern
Date: 10/24/2002 17:26:05
> The pool allocator has a couple of advantages over malloc():
>
> 1. It performs some cache coloring.
You mean it moves the unused space (in the page) about so that cache
near the end of the pagesize gets used?
> 2. It also provides caches of pre-constructed objects (this is
> used in a few places in the kernel).
Looks like only the pmap code (and only the sparc one is
complicated). If these are cached does it make more sense
to initialise them when they will be needed?
(There are also other ways of keeping a few pre-initialied items,
you probably want to create them in the idle loop anyway.)
Actually some of these mention uncached addresses for page tables.
> 3. Most importantly, pool can use direct-mapped segments that
> some platforms provide, greatly reducing TLB usage.
Is there any reason why malloc shouldn't use these?
(or even just 'large' pages when the mmu supports them)
David
--
David Laight: david@l8s.co.uk