Maxime Villard <[email protected]> wrote: | - kmem_intr_zalloc |After all, kmem_intr_zalloc is not needed since the caller can simply do | ptr = kmem_intr_alloc(...); | memset(ptr, 0, ...);
Well i never looked into the source but for my very own thing it was a major benefit to pass a "zero" flag down to the bottom since it allowed zeroing the real range, which was always on an aligned boundary and of "an aligned range" (multiple of eight or sixteen, multiple of pagesize for larger allocations), therefore ending up using the fastest memset path without need for pointer alignment and without the need for a do-the-remaining-byte thing, which resulted in measurable boosts (and that on x86, but in artificial use cases, of course). --steffen
