History

[IA64] Add __read_mostly support for IA64

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.

Christoph Lameter committed 20 years ago

Commit dc86e881 parent d5bf3162 files · +4 −1Browse files

Unified · Split

2 files
  1. arch/ia64/kernel/vmlinux.lds.S +3 −0
  2. include/linux/cache.h +1 −1
arch/ia64/kernel/vmlinux.lds.S+3−0
@@ -177,6 +177,9 @@ SECTIONS · 176 unmodified lines
177177 }
178178 . = ALIGN(PAGE_SIZE); /* make sure the gate page doesn't expose kernel data */
179179
180+ .data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET)
181+ { *(.data.read_mostly) }
182+
180183 .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET)
181184 { *(.data.cacheline_aligned) }
182185
include/linux/cache.h+1−1
@@ -13,7 +13,7 @@ · 12 unmodified lines
1313 #define SMP_CACHE_BYTES L1_CACHE_BYTES
1414 #endif
1515
16−#if defined(CONFIG_X86) || defined(CONFIG_SPARC64)
16+#if defined(CONFIG_X86) || defined(CONFIG_SPARC64) || defined(CONFIG_IA64)
1717 #define __read_mostly __attribute__((__section__(".data.read_mostly")))
1818 #else
1919 #define __read_mostly