From: Martin Schwidefsky <schwidefsky@de.ibm.com>
To: linux-kernel@vger.kernel.org, akpm@osdl.org, cborntra@de.ibm.com
Subject: [patch 12/13] s390: add read_mostly optimization.
Date: Mon, 24 Apr 2006 17:06:03 +0200 [thread overview]
Message-ID: <20060424150603.GM15613@skybase> (raw)
From: Christian Borntraeger <cborntra@de.ibm.com>
[patch 12/13] 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: Christian Borntraeger <cborntra@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
---
arch/s390/kernel/vmlinux.lds.S | 4 +++-
include/asm-s390/cache.h | 2 ++
2 files changed, 5 insertions(+), 1 deletion(-)
diff -urpN linux-2.6/arch/s390/kernel/vmlinux.lds.S linux-2.6-patched/arch/s390/kernel/vmlinux.lds.S
--- linux-2.6/arch/s390/kernel/vmlinux.lds.S 2006-03-20 06:53:29.000000000 +0100
+++ linux-2.6-patched/arch/s390/kernel/vmlinux.lds.S 2006-04-24 16:47:29.000000000 +0200
@@ -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 */
diff -urpN linux-2.6/include/asm-s390/cache.h linux-2.6-patched/include/asm-s390/cache.h
--- linux-2.6/include/asm-s390/cache.h 2006-03-20 06:53:29.000000000 +0100
+++ linux-2.6-patched/include/asm-s390/cache.h 2006-04-24 16:47:29.000000000 +0200
@@ -16,4 +16,6 @@
#define ARCH_KMALLOC_MINALIGN 8
+#define __read_mostly __attribute__((__section__(".data.read_mostly")))
+
#endif
reply other threads:[~2006-04-24 15:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060424150603.GM15613@skybase \
--to=schwidefsky@de.ibm.com \
--cc=akpm@osdl.org \
--cc=cborntra@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox