Subject: kernel proplib - pools or malloc?
To: None <tech-kern@netbsd.org>
From: Simon Burge <simonb@wasabisystems.com>
List: tech-kern
Date: 05/12/2006 10:47:39
Kernel proplib uses pools for storage, which take up at minimum a full
page if anything is in the pool. On a walnut, there's 4 populated
pools and the largest one has just over half a kB of data.
I tried using malloc/free instead of pools on a walnut kernel.
Booting to the "root device" prompt and then entering ddb and using
"show uvmexp" gives:
Current UVM status (with pools):
pagesize=16384 (0x4000), pagemask=0x3fff, pageshift=14
16037 VM pages: 0 active, 0 inactive, 3 wired, 15905 free
Current UVM status (with malloc):
pagesize=16384 (0x4000), pagemask=0x3fff, pageshift=14
16037 VM pages: 0 active, 0 inactive, 3 wired, 15910 free
So this is saving 80kB of wired kernel memory in this instance. Worth
switching over to malloc?
Simon.
--
Simon Burge <simonb@wasabisystems.com>
NetBSD Development, Support and Service: http://www.wasabisystems.com/