On Wed, Jan 19, 2011 at 6:02 PM, Allen Briggs <[email protected]> wrote: > On Wed, Jan 19, 2011 at 05:55:57PM +0100, Lars Heidieker wrote: >> > What are the benefits that you expect to see from doing this work? >> > Have you measured to see if those benefits are realized? >> >> Benefits I've thought about: >> - The kmem pools use pool_caches therefor scalability will be much >> better as the old malloc has a single lock for all access, the pools >> have one each with a per cpu cache layer. >> - The old malloc only returns oversized allocations back to the kmem >> layer but nothing that is in it's bucket, pools can be drained... >> - Removing one redundant interface in the kernel-api (in the long >> term, when dropping the malloc wrapper) > > Fair enough. Do you have any measurements to see if the benefits are > realized? Does it actually (not just theoretically) scale better? > Does draining happen and the system behave better in low-memory > situations? Does it stay up when it would panic/crash/stall before? > What is the code size savings for getting rid of the malloc code (and > leaving a shim or not)? >
Scalability should be better, but depending on how much the old malloc was used, I don't think it will be much. I am going to do the following measurements: - total kernel memory consumption. - count of kmem_map /kernel_map entries these should be down with the extended virtual-address-caching at the kmem_map / kernel_map layer (doing the equivalent to vmem quantum caches). fragmentation in those maps should go down. - memory size after running reclaims on the caches. kernel size is down a bit (build from the same config (i386)) text data bss dec hex filename 3214524 79288 257308 3551120 362f90 /netbsd 3209676 78488 258716 3546880 361f00 /netbsd.test >> I am in the progress of some cleanup work, I'll make a patch available >> within the next few days. > > Cool! > > -allen > > -- > Allen Briggs - [email protected] > -- Mystische Erklärungen: Die mystischen Erklärungen gelten für tief; die Wahrheit ist, dass sie noch nicht einmal oberflächlich sind. -- Friedrich Nietzsche [ Die Fröhliche Wissenschaft Buch 3, 126 ]
