[OpenAFS-devel] [PATCH] crget() memory allocation oddity

Joe Buehler jbuehler@spirentcom.com
Fri, 02 Jun 2006 16:13:54 -0400


Tom Keiser wrote:

> Does it even acquire a mutex most of the time?  The Linux allocator is
> based upon the Solaris slab allocator.  That allocator just disables
> preemption and tries to satisfy the allocations out of a cpu-local
> slab, only grabbing a mutex if the local allocation fails.  Our
> home-grown allocators are going to need major surgery to compete with
> such a highly-performant algorithm.

The overflow of the credentials allocation (over one page) was a performance
hit also -- it causes the code to use vmalloc instead of kmalloc, and vmalloc
has to set up page table entries.  The patch I posted to keep it all on
one page should eliminate this -- not to mention TLB thrashing.
-- 
Joe Buehler