Subject: pool(9) revisited
To: None <tech-kern@NetBSD.ORG>
From: Paul Kranenburg <pk@cs.few.eur.nl>
List: tech-kern
Date: 07/13/1998 12:45:27
After reading the Bonwick "slab" paper, I think we can easily adopt some
features from it:

	* cache coloring: skew the offset of items in a page to obtain
	  a more homogeneous distribution of KVAs wrt. hardware caches

	* no fixed upper limit on a pool's size. Let the page daemon
	  reclaim pages when running low on memory.
	  Optionally set a minimum amount of pool items that cannot be
	  reclaimed.

	* time limit on recently used pages; the reclaim function will
	  not release a page from a pool until N seconds have elapsed
	  since that page was last used (to avoid thrashing)


On my test machine, I've used pools to replace these private queues:

	* pmap/sun4m: pagetables
	* uvm_swap: all pre-allocated swap buffers +
		    auxiliary buffers for swapping to files.
	* regular mbufs (instead of MALLOC/FREE)


-pk