提交 58268b97 编写于 作者: C Christian Borntraeger 提交者: Linus Torvalds

[PATCH] s390: add read_mostly optimization

Add a read_mostly section and define __read_mostly to prevent cache line
pollution due to writes for mostly read variables.  In addition fix the
incorrect alignment of the cache_line_aligned data section.  s390 has a
cacheline size of 256 bytes.
Signed-off-by: NChristian Borntraeger <cborntra@de.ibm.com>
Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 b73d40c6
......@@ -58,9 +58,11 @@ SECTIONS
. = ALIGN(4096);
.data.page_aligned : { *(.data.idt) }
. = ALIGN(32);
. = ALIGN(256);
.data.cacheline_aligned : { *(.data.cacheline_aligned) }
. = ALIGN(256);
.data.read_mostly : { *(.data.read_mostly) }
_edata = .; /* End of data section */
. = ALIGN(8192); /* init_task */
......
......@@ -16,4 +16,6 @@
#define ARCH_KMALLOC_MINALIGN 8
#define __read_mostly __attribute__((__section__(".data.read_mostly")))
#endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册