Re: [PATCH] make kmem_find_general_cachep static in slab.c

From: Manfred Spraul
Date: Tue Sep 07 2004 - 12:22:12 EST


Christoph Hellwig wrote:

--- 1.35/include/linux/slab.h 2004-09-03 11:08:25 +02:00
+++ edited/include/linux/slab.h 2004-09-07 14:47:58 +02:00
@@ -55,7 +55,6 @@
/* prototypes */
extern void kmem_cache_init(void);

-extern kmem_cache_t *kmem_find_general_cachep(size_t, int gfpflags);



Why?
It's intended for users that want to kmalloc always the same amount of memory.
For example the network layer could call kmem_find_general_cachep once for dev->mtu and then just call kmem_cache_alloc instead of kmalloc. The loop in kmalloc often needs more cpu cycles than the actual alloc.

--
Manfred
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/