Thread (73 messages) 73 messages, 8 authors, 2007-06-28

Re: [patch 05/26] Slab allocators: Cleanup zeroing allocations

From: Christoph Lameter <hidden>
Date: 2007-06-18 21:55:37
Also in: lkml

On Mon, 18 Jun 2007, Pekka Enberg wrote:
On 6/18/07, clameter@sgi.com [off-list ref] wrote:
quoted
+static inline void *kmem_cache_zalloc(struct kmem_cache *k, gfp_t flags)
+{
+       return kmem_cache_alloc(k, flags | __GFP_ZERO);
+}
+
+static inline void *__kzalloc(int size, gfp_t flags)
+{
+       return kmalloc(size, flags | __GFP_ZERO);
+}
Hmm, did you check kernel text size before and after this change?
Setting the __GFP_ZERO flag at every kzalloc call-site seems like a
bad idea.
I did not check but the flags are usually constant. Compiler does the |.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help