on 12/11/2013 18:28 Alexander Motin said the following: > FreeBSD malloc() does use uma_zalloc_arg() caches for small allocations. For > big > it is less usable because large per-CPU caches tend to eat too much extra > memory > and it is quite hard to purge those per-CPU caches in low-memory condition. > But > considering that illumos at all has kmem_cache_alloc() KPI there is also > probably should be some difference from plain kmem_alloc().
I must add that unlike FreeBSD illumos limits per-cpu cache (magazine) size based on an object size. E.g., as far as I can see and if I understand the code correctly, for objects >= 32KB the limit is 1, for objects >= 16KB the limit is 3 and so forth according to kmem_magtype[]. On FreeBSD the limit is always 128, which is kind of wasteful indeed. Also, as Matt has said and as far as I can tell from kmem_big_alloc_sizes[], illumos caches kmem_alloc allocations up to 32KB. And the repertoire of cache zones for kmem_alloc is much richer than FreeBSD's repertoire for kernel malloc. -- Andriy Gapon _______________________________________________ developer mailing list [email protected] http://lists.open-zfs.org/mailman/listinfo/developer
