Re: [PATCH] IP fragment SLAB

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

 



Hello,

>      But kmalloc() calls kmem_cache_alloc() in turn. So whether
>    you call kmalloc or kmem_cache_alloc it is getting allocated
>    from slab cache.  Am I missing something here?
>    
> When you use kmalloc() it walks a linear table looking for
> the matching general cache.
> 
> You can avoid this overhead by figuring out the general
> cache that will be used at init time then feeding that
> cachep directly to kmem_cache_alloc().

And also kmem_cache_alloc() have an advantage about hardware cache.
kmem_cache_alloc() lets each objects use different cache line.

-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux