vmstat - Adjust kmalloc zone name display * Replace any spaces in zone names with underscores in the output to make sorting the output by field easier. * Add double -mm option to sort output by the higher of MemUse or SlabUse to make it easier to pick-out high-use zones.
kernel - Add kmalloc_obj subsystem step 1 * Implement per-zone memory management to kmalloc() in the form of kmalloc_obj() and friends. Currently the subsystem uses the same malloc_type structure but is otherwise distinct from the normal kmalloc(), so to avoid programming mistakes the *_obj() subsystem post-pends '_obj' to malloc_type pointers passed into it. This mechanism will eventually replace objcache. This mechanism is designed to greatly reduce fragmentation issues on systems with long uptimes. Eventually the feature will be better integrated and I will be able to remove the _obj stuff. * This is a object allocator, so the zone must be dedicated to one type of object with a fixed size. All allocations out of the zone are of the object. The allocator is not quite type-stable yet, but will be once existential locks are integrated into the freeing mechanism. * Implement a mini-slab allocator for management. Since the zones are single-object, similar to objcache, the fixed-size mini-slabs are a lot easier to optimize and much simpler in construction than the main kernel slab allocator. Uses a per-zone/per-cpu active/alternate slab with an ultra-optimized allocation path, and a per-zone partial/full/empty list. Also has a globaldata-based per-cpu cache of free slabs. The mini-slab allocator frees slabs back to the same cpu they were originally allocated from in order to retain memory locality over time. * Implement a passive cleanup poller. This currently polls kmalloc zones very slowly looking for excess full slabs to release back to the global slab cache or the system (if the global slab cache is full). This code will ultimately also handle existential type-stable freeing. * Fragmentation is greatly reduced due to the distinct zones. Slabs are dedicated to the zone and do not share allocation space with other zones. Also, when a zone is destroyed, all of its memory is cleanly disposed of and there will be no left-over fragmentation. * Initially use the new interface for the following. These zones tend to or can become quite big: vnodes namecache (but not related strings) hammer2 chains hammer2 inodes tmpfs nodes tmpfs dirents (but not related strings)
vmstat - Change re, pi, po and fr from counts to bytes * Change re, pi, po, and fr to bytes. re, pi, and po were previously paging related transaction counts (not even page counts) which really tells us absolutely nothing. The values are now displayed in terms of bytes reclaimed, paged in, paged out, and freed, with appropriate suffixes (nothing, K, M, or G).
vmstat(8): Remove no longer needed <sys/malloc.h> include. The <sys/objcache.h> now provides the "struct malloc_type" definition. This leaves only two utilities in base userland that reference kernel kmalloc() header: * sbin/vinum through <dev/raid/vinum/vinumhdr.h> * usr.bin/fstat through various <vfs/FS/FS.h> headers.
kernel - VM rework part 18 - Cleanup * Significantly reduce the zone limit for pvzone (for pmap pv_entry structures). pv_entry's are no longer allocated on a per-page basis so the limit can be made much smaller. This also has the effect of reducing the per-cpu cache limit which ultimately stabilizes wired memory use for the zone. * Also reduce the generic pre-cpu cache limit for zones. This only really effects the pvzone. * Make pvzone, mapentzone, and swap_zone __read_mostly. * Enhance vmstat -z, report current structural use and actual total memory use. * Also cleanup the copyright statement for vm/vm_zone.c. John Dyson's original copyright was slightly different than the BSD copyright and stipulated no changes, so separate out the DragonFly addendum.
vmstat - Fix formatting * 'fre' memory formatting width was incorrect, causing the rest of the field to be incorrectly offset. * Display more precision as the field width allows. * Add -b for 'brief' mode to display less precision. * Add -u for 'unformatted' mode to display raw numbers (columnar output will not be aligned).