tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Proposal: kmem_valloc [was: Re: raspberry pi panic 7.0_BETA after install fs resize]

Maxime Villard <> 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).


Home | Main Index | Thread Index | Old Index