[PATCH] Add __read_mostly support for IA64

From: Christoph Lameter <clameter_at_engr.sgi.com>
Date: 2005-12-13 04:34:32
sparc64, i386 and x86_64 have support for a special data section dedicated
to rarely updated data that is frequently read. The section was created to
avoid false sharing of those rarely read data with frequently written kernel
data.

This patch creates such a data section for ia64 and will group rarely written
data into this section.

Signed-off-by: Christoph Lameter <clameter@sgi.com>

Index: linux-2.6.15-rc5-mm2/arch/ia64/kernel/vmlinux.lds.S
===================================================================
--- linux-2.6.15-rc5-mm2.orig/arch/ia64/kernel/vmlinux.lds.S	2005-12-03 21:10:42.000000000 -0800
+++ linux-2.6.15-rc5-mm2/arch/ia64/kernel/vmlinux.lds.S	2005-12-12 09:21:32.000000000 -0800
@@ -177,6 +177,9 @@ SECTIONS
 	}
   . = ALIGN(PAGE_SIZE);		/* make sure the gate page doesn't expose kernel data */
 
+  .data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET)
+        { *(.data.read_mostly) }
+
   .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET)
         { *(.data.cacheline_aligned) }
 
Index: linux-2.6.15-rc5-mm2/include/linux/cache.h
===================================================================
--- linux-2.6.15-rc5-mm2.orig/include/linux/cache.h	2005-12-12 09:10:34.000000000 -0800
+++ linux-2.6.15-rc5-mm2/include/linux/cache.h	2005-12-12 09:14:57.000000000 -0800
@@ -13,7 +13,7 @@
 #define SMP_CACHE_BYTES L1_CACHE_BYTES
 #endif
 
-#if defined(CONFIG_X86) || defined(CONFIG_SPARC64)
+#if defined(CONFIG_X86) || defined(CONFIG_SPARC64) || defined(CONFIG_IA64)
 #define __read_mostly __attribute__((__section__(".data.read_mostly")))
 #else
 #define __read_mostly
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Tue Dec 13 04:34:43 2005

This archive was generated by hypermail 2.1.8 : 2005-12-13 04:34:58 EST