Re: [1/4] 2.6.23-rc4: known regressions

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Christoph Lameter
Date: Wednesday, August 29, 2007 - 5:11 pm

On Thu, 30 Aug 2007, Adrian Bunk wrote:


Could you give me an asm dump via objdump of one of these functions? 
I wonder what is going on there? Seeing the code generated may give us a 
hint what is going on.

Likely an old compiler that has troubles performing constant folding <sigh>. One 
solution would be to use a newer compiler?

And yes, the page allocator pass through patch in mm would fix this.

Or define CONFIG_BROKEN_CONSTANT_FOLDING for alpha and then use this 
patch:

---
 include/linux/slub_def.h |    4 ++++
 1 file changed, 4 insertions(+)

Index: linux-2.6/include/linux/slub_def.h
===================================================================
--- linux-2.6.orig/include/linux/slub_def.h	2007-08-29 17:03:48.000000000 -0700
+++ linux-2.6/include/linux/slub_def.h	2007-08-29 17:09:55.000000000 -0700
@@ -168,6 +168,7 @@ void *__kmalloc(size_t size, gfp_t flags
 
 static inline void *kmalloc(size_t size, gfp_t flags)
 {
+#ifndef CONFIG_BROKEN_CONSTANT_FOLDING
 	if (__builtin_constant_p(size) && !(flags & SLUB_DMA)) {
 		struct kmem_cache *s = kmalloc_slab(size);
 
@@ -176,6 +177,7 @@ static inline void *kmalloc(size_t size,
 
 		return kmem_cache_alloc(s, flags);
 	} else
+#endif
 		return __kmalloc(size, flags);
 }
 
@@ -185,6 +187,7 @@ void *kmem_cache_alloc_node(struct kmem_
 
 static inline void *kmalloc_node(size_t size, gfp_t flags, int node)
 {
+#ifndef CONFIG_BROKEN_CONSTANT_FOLDING
 	if (__builtin_constant_p(size) && !(flags & SLUB_DMA)) {
 		struct kmem_cache *s = kmalloc_slab(size);
 
@@ -193,6 +196,7 @@ static inline void *kmalloc_node(size_t 
 
 		return kmem_cache_alloc_node(s, flags, node);
 	} else
+#endif
 		return __kmalloc_node(size, flags, node);
 }
 #endif
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[1/4] 2.6.23-rc4: known regressions, Michal Piotrowski, (Wed Aug 29, 8:26 am)
Re: [1/4] 2.6.23-rc4: known regressions, Jan Dittmer, (Wed Aug 29, 11:04 am)
Re: [1/4] 2.6.23-rc4: known regressions, Jeff Chua, (Wed Aug 29, 12:07 pm)
Re: [1/4] 2.6.23-rc4: known regressions, Adrian Bunk, (Wed Aug 29, 4:47 pm)
Re: [1/4] 2.6.23-rc4: known regressions, Christoph Lameter, (Wed Aug 29, 5:11 pm)
Re: [1/4] 2.6.23-rc4: known regressions, Christoph Lameter, (Wed Aug 29, 5:39 pm)
Re: [1/4] 2.6.23-rc4: known regressions, Jan Dittmer, (Thu Aug 30, 12:10 am)
Re: [1/4] 2.6.23-rc4: known regressions, Christoph Lameter, (Thu Aug 30, 11:12 am)
Re: [1/4] 2.6.23-rc4: known regressions, Jan Dittmer, (Thu Aug 30, 11:46 am)
Re: [1/4] 2.6.23-rc4: known regressions, Christoph Lameter, (Fri Aug 31, 12:48 am)
Re: [1/4] 2.6.23-rc4: known regressions, Adrian Bunk, (Fri Aug 31, 1:03 am)