All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] macros for section name cleanup
@ 2009-04-30 19:32 ` Tim Abbott
  0 siblings, 0 replies; 37+ messages in thread
From: Tim Abbott @ 2009-04-30 19:32 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Anders Kaseorg, Waseem Daher, Denys Vlasenko, Jeff Arnold,
	Benjamin Herrenschmidt, Bryan Wu, Chris Zankel, Cyrill Gorcunov,
	David Howells, David S. Miller, dev-etrax, Geert Uytterhoeven,
	Greg Ungerer, Haavard Skinnemoen, Heiko Carstens, Helge Deller,
	Hirokazu Takata, H. Peter Anvin, Ingo Molnar, Jeff Dike,
	Jesper Nilsson, Kyle McMartin, Linus Torvalds, linux-alpha

Here are the architecture-independent macro definitions needed for
to clean up the kernel's section names.  The overall diffstat from
this section name cleanup project is:

 96 files changed, 261 insertions(+), 503 deletions(-)

The decrease results from removing a lot of redundancy in the linker
scripts.

The long-term goal here is to add support for building the kernel with
-ffunction-sections -fdata-sections.  This requires renaming all the
magic section names in the kernel of the form .text.foo, .data.foo,
.bss.foo, and .rodata.foo to not have collisions with sections
generated for code like:

static int nosave = 0; /* -fdata-sections places in .data.nosave */
static void head(); /* -ffunction-sections places in .text.head */

Sam Ravnborg proposed that rather than just renaming all the sections
outright, we should start by first getting more control over the
section names used in the kernel so that we can later rename sections
without touching too many files.  These patch series implement that
cleanup.  Later, there will be another patch series to actually rename
the sections.

I'm hoping we can get just these macro definitions into 2.6.30 so that
the arch maintainers don't have to grab the macro definitions for
their trees while reviewing the patches for 2.6.31.

Shortly, I'm going to send one patch series for each of the
architectures updating those architectures to use these new macros
(and otherwise cleaning up section names on those architectures).

	-Tim Abbott

Tim Abbott (6):
  Add new macros for page-aligned data and bss sections.
  Add new NOSAVE_DATA linker script macro.
  Add new CACHELINE_ALIGNED_DATA linker script macro.
  Add new INIT_TASK_DATA() linker script macro.
  Add new READ_MOSTLY_DATA(align) linker script macro.
  Add support for __read_mostly to linux/cache.h

 include/asm-generic/vmlinux.lds.h |   27 +++++++++++++++++++++++++++
 include/linux/cache.h             |    6 ++++++
 include/linux/init_task.h         |    3 +++
 include/linux/linkage.h           |    9 +++++++++
 4 files changed, 45 insertions(+), 0 deletions(-)

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 0/6] macros for section name cleanup
@ 2009-04-30 19:32 ` Tim Abbott
  0 siblings, 0 replies; 37+ messages in thread
From: Tim Abbott @ 2009-04-30 19:32 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Anders Kaseorg, Waseem Daher, Denys Vlasenko, Jeff Arnold,
	Benjamin Herrenschmidt, Bryan Wu, Chris Zankel, Cyrill Gorcunov,
	David Howells, David S. Miller, dev-etrax, Geert Uytterhoeven,
	Greg Ungerer, Haavard Skinnemoen, Heiko Carstens, Helge Deller,
	Hirokazu Takata, H. Peter Anvin, Ingo Molnar, Jeff Dike,
	Jesper Nilsson, Kyle McMartin, Linus Torvalds, linux-alpha,
	linux-am33-list, linux-arm-kernel, linux-ia64, linux-m32r,
	linux-m68k, linux-mips, linux-parisc, linuxppc-dev, linux-s390,
	linux-sh, Martin Schwidefsky, Michal Simek, microblaze-uclinux,
	Mikael Starvik, Paul Mackerras, Paul Mundt, Ralf Baechle,
	Richard Henderson, Roman Zippel, Russell King, sparclinux,
	Thomas Gleixner, Tony Luck, uclinux-dist-devel,
	user-mode-linux-devel, Yoshinori Sato, Tim Abbott

Here are the architecture-independent macro definitions needed for
to clean up the kernel's section names.  The overall diffstat from
this section name cleanup project is:

 96 files changed, 261 insertions(+), 503 deletions(-)

The decrease results from removing a lot of redundancy in the linker
scripts.

The long-term goal here is to add support for building the kernel with
-ffunction-sections -fdata-sections.  This requires renaming all the
magic section names in the kernel of the form .text.foo, .data.foo,
.bss.foo, and .rodata.foo to not have collisions with sections
generated for code like:

static int nosave = 0; /* -fdata-sections places in .data.nosave */
static void head(); /* -ffunction-sections places in .text.head */

Sam Ravnborg proposed that rather than just renaming all the sections
outright, we should start by first getting more control over the
section names used in the kernel so that we can later rename sections
without touching too many files.  These patch series implement that
cleanup.  Later, there will be another patch series to actually rename
the sections.

I'm hoping we can get just these macro definitions into 2.6.30 so that
the arch maintainers don't have to grab the macro definitions for
their trees while reviewing the patches for 2.6.31.

Shortly, I'm going to send one patch series for each of the
architectures updating those architectures to use these new macros
(and otherwise cleaning up section names on those architectures).

	-Tim Abbott

Tim Abbott (6):
  Add new macros for page-aligned data and bss sections.
  Add new NOSAVE_DATA linker script macro.
  Add new CACHELINE_ALIGNED_DATA linker script macro.
  Add new INIT_TASK_DATA() linker script macro.
  Add new READ_MOSTLY_DATA(align) linker script macro.
  Add support for __read_mostly to linux/cache.h

 include/asm-generic/vmlinux.lds.h |   27 +++++++++++++++++++++++++++
 include/linux/cache.h             |    6 ++++++
 include/linux/init_task.h         |    3 +++
 include/linux/linkage.h           |    9 +++++++++
 4 files changed, 45 insertions(+), 0 deletions(-)

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 0/6] macros for section name cleanup
@ 2009-04-30 19:32 ` Tim Abbott
  0 siblings, 0 replies; 37+ messages in thread
From: Tim Abbott @ 2009-04-30 19:32 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: linux-mips, linux-m68k, linux-ia64, linux-sh, Denys Vlasenko,
	Greg Ungerer, Jeff Arnold, linuxppc-dev, Paul Mackerras,
	H. Peter Anvin, sparclinux, Waseem Daher, linux-arm-kernel,
	linux-s390, Jesper Nilsson, linux-am33-list, Yoshinori Sato,
	Helge Deller, Ingo Molnar, Geert Uytterhoeven,
	microblaze-uclinux, Russell King, user-mode-linux-devel,
	Heiko Carstens, Jeff Dike, dev-etrax, Mikael Starvik, Tony Luck,
	Tim Abbott, Cyrill Gorcunov, Michal Simek, Richard Henderson,
	Chris Zankel, Bryan Wu, linux-m32r, linux-parisc,
	Haavard Skinnemoen, Hirokazu Takata, Ralf Baechle,
	Anders Kaseorg, Kyle McMartin, Paul Mundt, Thomas Gleixner,
	linux-alpha, Martin Schwidefsky, uclinux-dist-devel,
	Linus Torvalds, David S. Miller

Here are the architecture-independent macro definitions needed for
to clean up the kernel's section names.  The overall diffstat from
this section name cleanup project is:

 96 files changed, 261 insertions(+), 503 deletions(-)

The decrease results from removing a lot of redundancy in the linker
scripts.

The long-term goal here is to add support for building the kernel with
-ffunction-sections -fdata-sections.  This requires renaming all the
magic section names in the kernel of the form .text.foo, .data.foo,
.bss.foo, and .rodata.foo to not have collisions with sections
generated for code like:

static int nosave = 0; /* -fdata-sections places in .data.nosave */
static void head(); /* -ffunction-sections places in .text.head */

Sam Ravnborg proposed that rather than just renaming all the sections
outright, we should start by first getting more control over the
section names used in the kernel so that we can later rename sections
without touching too many files.  These patch series implement that
cleanup.  Later, there will be another patch series to actually rename
the sections.

I'm hoping we can get just these macro definitions into 2.6.30 so that
the arch maintainers don't have to grab the macro definitions for
their trees while reviewing the patches for 2.6.31.

Shortly, I'm going to send one patch series for each of the
architectures updating those architectures to use these new macros
(and otherwise cleaning up section names on those architectures).

	-Tim Abbott

Tim Abbott (6):
  Add new macros for page-aligned data and bss sections.
  Add new NOSAVE_DATA linker script macro.
  Add new CACHELINE_ALIGNED_DATA linker script macro.
  Add new INIT_TASK_DATA() linker script macro.
  Add new READ_MOSTLY_DATA(align) linker script macro.
  Add support for __read_mostly to linux/cache.h

 include/asm-generic/vmlinux.lds.h |   27 +++++++++++++++++++++++++++
 include/linux/cache.h             |    6 ++++++
 include/linux/init_task.h         |    3 +++
 include/linux/linkage.h           |    9 +++++++++
 4 files changed, 45 insertions(+), 0 deletions(-)

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 1/6] Add new macros for page-aligned data and bss sections.
  2009-04-30 19:32 ` Tim Abbott
  (?)
  (?)
@ 2009-04-30 19:32   ` Tim Abbott
  -1 siblings, 0 replies; 37+ messages in thread
From: Tim Abbott @ 2009-04-30 19:32 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Anders Kaseorg, Waseem Daher, Denys Vlasenko, Jeff Arnold,
	Benjamin Herrenschmidt, Bryan Wu, Chris Zankel, Cyrill Gorcunov,
	David Howells, David S. Miller, dev-etrax, Geert Uytterhoeven,
	Greg Ungerer, Haavard Skinnemoen, Heiko Carstens, Helge Deller,
	Hirokazu Takata, H. Peter Anvin, Ingo Molnar, Jeff Dike,
	Jesper Nilsson, Kyle McMartin, Linus Torvalds, linux-alpha

This patch is preparation for replacing most uses of
".bss.page_aligned" and ".data.page_aligned" in the kernel with
macros, so that the section name can later be changed without having
to touch a lot of the kernel.

The long-term goal here is to be able to change the kernel's magic
section names to those that are compatible with -ffunction-sections
-fdata-sections.  This requires renaming all magic sections with names
of the form ".data.foo".

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: Sam Ravnborg <sam@ravnborg.org>
Acked-by: David Howells <dhowells@redhat.com>
---
 include/asm-generic/vmlinux.lds.h |    8 ++++++++
 include/linux/linkage.h           |    9 +++++++++
 2 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 89853bc..3d88c87 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -116,6 +116,14 @@
 	FTRACE_EVENTS()							\
 	TRACE_SYSCALLS()
 
+#define PAGE_ALIGNED_DATA						\
+	. = ALIGN(PAGE_SIZE);						\
+	*(.data.page_aligned)
+
+#define PAGE_ALIGNED_BSS						\
+	. = ALIGN(PAGE_SIZE);						\
+	*(.bss.page_aligned)
+
 #define RO_DATA(align)							\
 	. = ALIGN((align));						\
 	.rodata           : AT(ADDR(.rodata) - LOAD_OFFSET) {		\
diff --git a/include/linux/linkage.h b/include/linux/linkage.h
index fee9e59..af051fc 100644
--- a/include/linux/linkage.h
+++ b/include/linux/linkage.h
@@ -22,6 +22,15 @@
 #define __page_aligned_bss	__section(.bss.page_aligned) __aligned(PAGE_SIZE)
 
 /*
+ * For assembly routines.
+ *
+ * Note when using these that you must specify the appropriate
+ * alignment directives yourself
+ */
+#define __PAGE_ALIGNED_DATA	.section ".data.page_aligned", "aw", @progbits
+#define __PAGE_ALIGNED_BSS	.section ".bss.page_aligned", "aw", @nobits
+
+/*
  * This is used by architectures to keep arguments on the stack
  * untouched by the compiler by keeping them live until the end.
  * The argument stack may be owned by the assembly-language
-- 
1.6.2.1

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 1/6] Add new macros for page-aligned data and bss sections.
@ 2009-04-30 19:32   ` Tim Abbott
  0 siblings, 0 replies; 37+ messages in thread
From: Tim Abbott @ 2009-04-30 19:32 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Anders Kaseorg, Waseem Daher, Denys Vlasenko, Jeff Arnold,
	Benjamin Herrenschmidt, Bryan Wu, Chris Zankel, Cyrill Gorcunov,
	David Howells, David S. Miller, dev-etrax, Geert Uytterhoeven,
	Greg Ungerer, Haavard Skinnemoen, Heiko Carstens, Helge Deller,
	Hirokazu Takata, H. Peter Anvin, Ingo Molnar, Jeff Dike,
	Jesper Nilsson, Kyle McMartin, Linus Torvalds, linux-alpha,
	linux-am33-list, linux-arm-kernel, linux-ia64, linux-m32r,
	linux-m68k, linux-mips, linux-parisc, linuxppc-dev, linux-s390,
	linux-sh, Martin Schwidefsky, Michal Simek, microblaze-uclinux,
	Mikael Starvik, Paul Mackerras, Paul Mundt, Ralf Baechle,
	Richard Henderson, Roman Zippel, Russell King, sparclinux,
	Thomas Gleixner, Tony Luck, uclinux-dist-devel,
	user-mode-linux-devel, Yoshinori Sato, Tim Abbott, Sam Ravnborg

This patch is preparation for replacing most uses of
".bss.page_aligned" and ".data.page_aligned" in the kernel with
macros, so that the section name can later be changed without having
to touch a lot of the kernel.

The long-term goal here is to be able to change the kernel's magic
section names to those that are compatible with -ffunction-sections
-fdata-sections.  This requires renaming all magic sections with names
of the form ".data.foo".

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: Sam Ravnborg <sam@ravnborg.org>
Acked-by: David Howells <dhowells@redhat.com>
---
 include/asm-generic/vmlinux.lds.h |    8 ++++++++
 include/linux/linkage.h           |    9 +++++++++
 2 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 89853bc..3d88c87 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -116,6 +116,14 @@
 	FTRACE_EVENTS()							\
 	TRACE_SYSCALLS()
 
+#define PAGE_ALIGNED_DATA						\
+	. = ALIGN(PAGE_SIZE);						\
+	*(.data.page_aligned)
+
+#define PAGE_ALIGNED_BSS						\
+	. = ALIGN(PAGE_SIZE);						\
+	*(.bss.page_aligned)
+
 #define RO_DATA(align)							\
 	. = ALIGN((align));						\
 	.rodata           : AT(ADDR(.rodata) - LOAD_OFFSET) {		\
diff --git a/include/linux/linkage.h b/include/linux/linkage.h
index fee9e59..af051fc 100644
--- a/include/linux/linkage.h
+++ b/include/linux/linkage.h
@@ -22,6 +22,15 @@
 #define __page_aligned_bss	__section(.bss.page_aligned) __aligned(PAGE_SIZE)
 
 /*
+ * For assembly routines.
+ *
+ * Note when using these that you must specify the appropriate
+ * alignment directives yourself
+ */
+#define __PAGE_ALIGNED_DATA	.section ".data.page_aligned", "aw", @progbits
+#define __PAGE_ALIGNED_BSS	.section ".bss.page_aligned", "aw", @nobits
+
+/*
  * This is used by architectures to keep arguments on the stack
  * untouched by the compiler by keeping them live until the end.
  * The argument stack may be owned by the assembly-language
-- 
1.6.2.1

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 1/6] Add new macros for page-aligned data and bss sections.
@ 2009-04-30 19:32   ` Tim Abbott
  0 siblings, 0 replies; 37+ messages in thread
From: Tim Abbott @ 2009-04-30 19:32 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Anders Kaseorg, Waseem Daher, Denys Vlasenko, Jeff Arnold,
	Benjamin Herrenschmidt, Bryan Wu, Chris Zankel, Cyrill Gorcunov,
	David Howells, David S. Miller, dev-etrax, Geert Uytterhoeven,
	Greg Ungerer, Haavard Skinnemoen, Heiko Carstens, Helge Deller,
	Hirokazu Takata, H. Peter Anvin, Ingo Molnar, Jeff Dike,
	Jesper Nilsson, Kyle McMartin, Linus Torvalds, linux-alpha,
	linux-am33-list, linux-arm-kernel, linux-ia64, linux-m32r,
	linux-m68k, linux-mips, linux-parisc, linuxppc-dev, linux-s390,
	linux-sh, Martin Schwidefsky, Michal Simek, microblaze-uclinux,
	Mikael Starvik, Paul Mackerras, Paul Mundt, Ralf Baechle,
	Richard Henderson, Roman Zippel, Russell King, sparclinux,
	Thomas Gleixner, Tony Luck, uclinux-dist-devel,
	user-mode-linux-devel, Yoshinori Sato, Tim Abbott

This patch is preparation for replacing most uses of
".bss.page_aligned" and ".data.page_aligned" in the kernel with
macros, so that the section name can later be changed without having
to touch a lot of the kernel.

The long-term goal here is to be able to change the kernel's magic
section names to those that are compatible with -ffunction-sections
-fdata-sections.  This requires renaming all magic sections with names
of the form ".data.foo".

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: Sam Ravnborg <sam@ravnborg.org>
Acked-by: David Howells <dhowells@redhat.com>
---
 include/asm-generic/vmlinux.lds.h |    8 ++++++++
 include/linux/linkage.h           |    9 +++++++++
 2 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 89853bc..3d88c87 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -116,6 +116,14 @@
 	FTRACE_EVENTS()							\
 	TRACE_SYSCALLS()
 
+#define PAGE_ALIGNED_DATA						\
+	. = ALIGN(PAGE_SIZE);						\
+	*(.data.page_aligned)
+
+#define PAGE_ALIGNED_BSS						\
+	. = ALIGN(PAGE_SIZE);						\
+	*(.bss.page_aligned)
+
 #define RO_DATA(align)							\
 	. = ALIGN((align));						\
 	.rodata           : AT(ADDR(.rodata) - LOAD_OFFSET) {		\
diff --git a/include/linux/linkage.h b/include/linux/linkage.h
index fee9e59..af051fc 100644
--- a/include/linux/linkage.h
+++ b/include/linux/linkage.h
@@ -22,6 +22,15 @@
 #define __page_aligned_bss	__section(.bss.page_aligned) __aligned(PAGE_SIZE)
 
 /*
+ * For assembly routines.
+ *
+ * Note when using these that you must specify the appropriate
+ * alignment directives yourself
+ */
+#define __PAGE_ALIGNED_DATA	.section ".data.page_aligned", "aw", @progbits
+#define __PAGE_ALIGNED_BSS	.section ".bss.page_aligned", "aw", @nobits
+
+/*
  * This is used by architectures to keep arguments on the stack
  * untouched by the compiler by keeping them live until the end.
  * The argument stack may be owned by the assembly-language
-- 
1.6.2.1

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 1/6] Add new macros for page-aligned data and bss sections.
@ 2009-04-30 19:32   ` Tim Abbott
  0 siblings, 0 replies; 37+ messages in thread
From: Tim Abbott @ 2009-04-30 19:32 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: linux-mips, linux-m68k, linux-ia64, linux-sh, Denys Vlasenko,
	Greg Ungerer, Jeff Arnold, linuxppc-dev, Paul Mackerras,
	H. Peter Anvin, sparclinux, Sam Ravnborg, Waseem Daher,
	linux-arm-kernel, linux-s390, Jesper Nilsson, linux-am33-list,
	Yoshinori Sato, Helge Deller, Ingo Molnar, Geert Uytterhoeven,
	microblaze-uclinux, Russell King, user-mode-linux-devel,
	Heiko Carstens, Jeff Dike, dev-etrax, Mikael Starvik, Tony Luck,
	Tim Abbott, Cyrill Gorcunov, Michal Simek, Richard Henderson,
	Chris Zankel, Bryan Wu, linux-m32r, linux-parisc,
	Haavard Skinnemoen, Hirokazu Takata, Ralf Baechle,
	Anders Kaseorg, Kyle McMartin, Paul Mundt, Thomas Gleixner,
	linux-alpha, Martin Schwidefsky, uclinux-dist-devel,
	Linus Torvalds, David S. Miller

This patch is preparation for replacing most uses of
".bss.page_aligned" and ".data.page_aligned" in the kernel with
macros, so that the section name can later be changed without having
to touch a lot of the kernel.

The long-term goal here is to be able to change the kernel's magic
section names to those that are compatible with -ffunction-sections
-fdata-sections.  This requires renaming all magic sections with names
of the form ".data.foo".

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: Sam Ravnborg <sam@ravnborg.org>
Acked-by: David Howells <dhowells@redhat.com>
---
 include/asm-generic/vmlinux.lds.h |    8 ++++++++
 include/linux/linkage.h           |    9 +++++++++
 2 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 89853bc..3d88c87 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -116,6 +116,14 @@
 	FTRACE_EVENTS()							\
 	TRACE_SYSCALLS()
 
+#define PAGE_ALIGNED_DATA						\
+	. = ALIGN(PAGE_SIZE);						\
+	*(.data.page_aligned)
+
+#define PAGE_ALIGNED_BSS						\
+	. = ALIGN(PAGE_SIZE);						\
+	*(.bss.page_aligned)
+
 #define RO_DATA(align)							\
 	. = ALIGN((align));						\
 	.rodata           : AT(ADDR(.rodata) - LOAD_OFFSET) {		\
diff --git a/include/linux/linkage.h b/include/linux/linkage.h
index fee9e59..af051fc 100644
--- a/include/linux/linkage.h
+++ b/include/linux/linkage.h
@@ -22,6 +22,15 @@
 #define __page_aligned_bss	__section(.bss.page_aligned) __aligned(PAGE_SIZE)
 
 /*
+ * For assembly routines.
+ *
+ * Note when using these that you must specify the appropriate
+ * alignment directives yourself
+ */
+#define __PAGE_ALIGNED_DATA	.section ".data.page_aligned", "aw", @progbits
+#define __PAGE_ALIGNED_BSS	.section ".bss.page_aligned", "aw", @nobits
+
+/*
  * This is used by architectures to keep arguments on the stack
  * untouched by the compiler by keeping them live until the end.
  * The argument stack may be owned by the assembly-language
-- 
1.6.2.1

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 2/6] Add new NOSAVE_DATA linker script macro.
  2009-04-30 19:32   ` Tim Abbott
  (?)
  (?)
@ 2009-04-30 19:32     ` Tim Abbott
  -1 siblings, 0 replies; 37+ messages in thread
From: Tim Abbott @ 2009-04-30 19:32 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Anders Kaseorg, Waseem Daher, Denys Vlasenko, Jeff Arnold,
	Benjamin Herrenschmidt, Bryan Wu, Chris Zankel, Cyrill Gorcunov,
	David Howells, David S. Miller, dev-etrax, Geert Uytterhoeven,
	Greg Ungerer, Haavard Skinnemoen, Heiko Carstens, Helge Deller,
	Hirokazu Takata, H. Peter Anvin, Ingo Molnar, Jeff Dike,
	Jesper Nilsson, Kyle McMartin, Linus Torvalds, linux-alpha

This patch is preparation for replacing most ".data.nosave" in the
kernel with macros, so that the section name can later be changed
without having to touch a lot of the kernel.

The long-term goal here is to be able to change the kernel's magic
section names to those that are compatible with -ffunction-sections
-fdata-sections.  This requires renaming all magic sections with names
of the form ".data.foo".

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: Sam Ravnborg <sam@ravnborg.org>
---
 include/asm-generic/vmlinux.lds.h |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 3d88c87..f5ebd2b 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -124,6 +124,13 @@
 	. = ALIGN(PAGE_SIZE);						\
 	*(.bss.page_aligned)
 
+#define NOSAVE_DATA							\
+	. = ALIGN(PAGE_SIZE);						\
+	__nosave_begin = .;						\
+	*(.data.nosave)							\
+	. = ALIGN(PAGE_SIZE);						\
+	__nosave_end = .;
+
 #define RO_DATA(align)							\
 	. = ALIGN((align));						\
 	.rodata           : AT(ADDR(.rodata) - LOAD_OFFSET) {		\
-- 
1.6.2.1

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 2/6] Add new NOSAVE_DATA linker script macro.
@ 2009-04-30 19:32     ` Tim Abbott
  0 siblings, 0 replies; 37+ messages in thread
From: Tim Abbott @ 2009-04-30 19:32 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Anders Kaseorg, Waseem Daher, Denys Vlasenko, Jeff Arnold,
	Benjamin Herrenschmidt, Bryan Wu, Chris Zankel, Cyrill Gorcunov,
	David Howells, David S. Miller, dev-etrax, Geert Uytterhoeven,
	Greg Ungerer, Haavard Skinnemoen, Heiko Carstens, Helge Deller,
	Hirokazu Takata, H. Peter Anvin, Ingo Molnar, Jeff Dike,
	Jesper Nilsson, Kyle McMartin, Linus Torvalds, linux-alpha,
	linux-am33-list, linux-arm-kernel, linux-ia64, linux-m32r,
	linux-m68k, linux-mips, linux-parisc, linuxppc-dev, linux-s390,
	linux-sh, Martin Schwidefsky, Michal Simek, microblaze-uclinux,
	Mikael Starvik, Paul Mackerras, Paul Mundt, Ralf Baechle,
	Richard Henderson, Roman Zippel, Russell King, sparclinux,
	Thomas Gleixner, Tony Luck, uclinux-dist-devel,
	user-mode-linux-devel, Yoshinori Sato, Tim Abbott, Sam Ravnborg

This patch is preparation for replacing most ".data.nosave" in the
kernel with macros, so that the section name can later be changed
without having to touch a lot of the kernel.

The long-term goal here is to be able to change the kernel's magic
section names to those that are compatible with -ffunction-sections
-fdata-sections.  This requires renaming all magic sections with names
of the form ".data.foo".

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: Sam Ravnborg <sam@ravnborg.org>
---
 include/asm-generic/vmlinux.lds.h |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 3d88c87..f5ebd2b 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -124,6 +124,13 @@
 	. = ALIGN(PAGE_SIZE);						\
 	*(.bss.page_aligned)
 
+#define NOSAVE_DATA							\
+	. = ALIGN(PAGE_SIZE);						\
+	__nosave_begin = .;						\
+	*(.data.nosave)							\
+	. = ALIGN(PAGE_SIZE);						\
+	__nosave_end = .;
+
 #define RO_DATA(align)							\
 	. = ALIGN((align));						\
 	.rodata           : AT(ADDR(.rodata) - LOAD_OFFSET) {		\
-- 
1.6.2.1

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 2/6] Add new NOSAVE_DATA linker script macro.
@ 2009-04-30 19:32     ` Tim Abbott
  0 siblings, 0 replies; 37+ messages in thread
From: Tim Abbott @ 2009-04-30 19:32 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Anders Kaseorg, Waseem Daher, Denys Vlasenko, Jeff Arnold,
	Benjamin Herrenschmidt, Bryan Wu, Chris Zankel, Cyrill Gorcunov,
	David Howells, David S. Miller, dev-etrax, Geert Uytterhoeven,
	Greg Ungerer, Haavard Skinnemoen, Heiko Carstens, Helge Deller,
	Hirokazu Takata, H. Peter Anvin, Ingo Molnar, Jeff Dike,
	Jesper Nilsson, Kyle McMartin, Linus Torvalds, linux-alpha,
	linux-am33-list, linux-arm-kernel, linux-ia64, linux-m32r,
	linux-m68k, linux-mips, linux-parisc, linuxppc-dev, linux-s390,
	linux-sh, Martin Schwidefsky, Michal Simek, microblaze-uclinux,
	Mikael Starvik, Paul Mackerras, Paul Mundt, Ralf Baechle,
	Richard Henderson, Roman Zippel, Russell King, sparclinux,
	Thomas Gleixner, Tony Luck, uclinux-dist-devel,
	user-mode-linux-devel, Yoshinori Sato, Tim Abbott

This patch is preparation for replacing most ".data.nosave" in the
kernel with macros, so that the section name can later be changed
without having to touch a lot of the kernel.

The long-term goal here is to be able to change the kernel's magic
section names to those that are compatible with -ffunction-sections
-fdata-sections.  This requires renaming all magic sections with names
of the form ".data.foo".

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: Sam Ravnborg <sam@ravnborg.org>
---
 include/asm-generic/vmlinux.lds.h |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 3d88c87..f5ebd2b 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -124,6 +124,13 @@
 	. = ALIGN(PAGE_SIZE);						\
 	*(.bss.page_aligned)
 
+#define NOSAVE_DATA							\
+	. = ALIGN(PAGE_SIZE);						\
+	__nosave_begin = .;						\
+	*(.data.nosave)							\
+	. = ALIGN(PAGE_SIZE);						\
+	__nosave_end = .;
+
 #define RO_DATA(align)							\
 	. = ALIGN((align));						\
 	.rodata           : AT(ADDR(.rodata) - LOAD_OFFSET) {		\
-- 
1.6.2.1

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 2/6] Add new NOSAVE_DATA linker script macro.
@ 2009-04-30 19:32     ` Tim Abbott
  0 siblings, 0 replies; 37+ messages in thread
From: Tim Abbott @ 2009-04-30 19:32 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: linux-mips, linux-m68k, linux-ia64, linux-sh, Denys Vlasenko,
	Greg Ungerer, Jeff Arnold, linuxppc-dev, Paul Mackerras,
	H. Peter Anvin, sparclinux, Sam Ravnborg, Waseem Daher,
	linux-arm-kernel, linux-s390, Jesper Nilsson, linux-am33-list,
	Yoshinori Sato, Helge Deller, Ingo Molnar, Geert Uytterhoeven,
	microblaze-uclinux, Russell King, user-mode-linux-devel,
	Heiko Carstens, Jeff Dike, dev-etrax, Mikael Starvik, Tony Luck,
	Tim Abbott, Cyrill Gorcunov, Michal Simek, Richard Henderson,
	Chris Zankel, Bryan Wu, linux-m32r, linux-parisc,
	Haavard Skinnemoen, Hirokazu Takata, Ralf Baechle,
	Anders Kaseorg, Kyle McMartin, Paul Mundt, Thomas Gleixner,
	linux-alpha, Martin Schwidefsky, uclinux-dist-devel,
	Linus Torvalds, David S. Miller

This patch is preparation for replacing most ".data.nosave" in the
kernel with macros, so that the section name can later be changed
without having to touch a lot of the kernel.

The long-term goal here is to be able to change the kernel's magic
section names to those that are compatible with -ffunction-sections
-fdata-sections.  This requires renaming all magic sections with names
of the form ".data.foo".

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: Sam Ravnborg <sam@ravnborg.org>
---
 include/asm-generic/vmlinux.lds.h |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 3d88c87..f5ebd2b 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -124,6 +124,13 @@
 	. = ALIGN(PAGE_SIZE);						\
 	*(.bss.page_aligned)
 
+#define NOSAVE_DATA							\
+	. = ALIGN(PAGE_SIZE);						\
+	__nosave_begin = .;						\
+	*(.data.nosave)							\
+	. = ALIGN(PAGE_SIZE);						\
+	__nosave_end = .;
+
 #define RO_DATA(align)							\
 	. = ALIGN((align));						\
 	.rodata           : AT(ADDR(.rodata) - LOAD_OFFSET) {		\
-- 
1.6.2.1

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 3/6] Add new CACHELINE_ALIGNED_DATA linker script macro.
  2009-04-30 19:32     ` Tim Abbott
  (?)
  (?)
@ 2009-04-30 19:32       ` Tim Abbott
  -1 siblings, 0 replies; 37+ messages in thread
From: Tim Abbott @ 2009-04-30 19:32 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Anders Kaseorg, Waseem Daher, Denys Vlasenko, Jeff Arnold,
	Benjamin Herrenschmidt, Bryan Wu, Chris Zankel, Cyrill Gorcunov,
	David Howells, David S. Miller, dev-etrax, Geert Uytterhoeven,
	Greg Ungerer, Haavard Skinnemoen, Heiko Carstens, Helge Deller,
	Hirokazu Takata, H. Peter Anvin, Ingo Molnar, Jeff Dike,
	Jesper Nilsson, Kyle McMartin, Linus Torvalds, linux-alpha

This patch is preparation for replacing most ".data.cacheline_aligned"
in the kernel with macros, so that the section name can later be
changed without having to touch a lot of the kernel.

The long-term goal here is to be able to change the kernel's magic
section names to those that are compatible with -ffunction-sections
-fdata-sections.  This requires renaming all magic sections with names
of the form ".data.foo".

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: Sam Ravnborg <sam@ravnborg.org>
---
 include/asm-generic/vmlinux.lds.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index f5ebd2b..fa7801b 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -131,6 +131,10 @@
 	. = ALIGN(PAGE_SIZE);						\
 	__nosave_end = .;
 
+#define CACHELINE_ALIGNED_DATA(alignment)				\
+	. = ALIGN(alignment);						\
+	*(.data.cacheline_aligned)
+
 #define RO_DATA(align)							\
 	. = ALIGN((align));						\
 	.rodata           : AT(ADDR(.rodata) - LOAD_OFFSET) {		\
-- 
1.6.2.1

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 3/6] Add new CACHELINE_ALIGNED_DATA linker script macro.
@ 2009-04-30 19:32       ` Tim Abbott
  0 siblings, 0 replies; 37+ messages in thread
From: Tim Abbott @ 2009-04-30 19:32 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Anders Kaseorg, Waseem Daher, Denys Vlasenko, Jeff Arnold,
	Benjamin Herrenschmidt, Bryan Wu, Chris Zankel, Cyrill Gorcunov,
	David Howells, David S. Miller, dev-etrax, Geert Uytterhoeven,
	Greg Ungerer, Haavard Skinnemoen, Heiko Carstens, Helge Deller,
	Hirokazu Takata, H. Peter Anvin, Ingo Molnar, Jeff Dike,
	Jesper Nilsson, Kyle McMartin, Linus Torvalds, linux-alpha,
	linux-am33-list, linux-arm-kernel, linux-ia64, linux-m32r,
	linux-m68k, linux-mips, linux-parisc, linuxppc-dev, linux-s390,
	linux-sh, Martin Schwidefsky, Michal Simek, microblaze-uclinux,
	Mikael Starvik, Paul Mackerras, Paul Mundt, Ralf Baechle,
	Richard Henderson, Roman Zippel, Russell King, sparclinux,
	Thomas Gleixner, Tony Luck, uclinux-dist-devel,
	user-mode-linux-devel, Yoshinori Sato, Tim Abbott, Sam Ravnborg

This patch is preparation for replacing most ".data.cacheline_aligned"
in the kernel with macros, so that the section name can later be
changed without having to touch a lot of the kernel.

The long-term goal here is to be able to change the kernel's magic
section names to those that are compatible with -ffunction-sections
-fdata-sections.  This requires renaming all magic sections with names
of the form ".data.foo".

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: Sam Ravnborg <sam@ravnborg.org>
---
 include/asm-generic/vmlinux.lds.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index f5ebd2b..fa7801b 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -131,6 +131,10 @@
 	. = ALIGN(PAGE_SIZE);						\
 	__nosave_end = .;
 
+#define CACHELINE_ALIGNED_DATA(alignment)				\
+	. = ALIGN(alignment);						\
+	*(.data.cacheline_aligned)
+
 #define RO_DATA(align)							\
 	. = ALIGN((align));						\
 	.rodata           : AT(ADDR(.rodata) - LOAD_OFFSET) {		\
-- 
1.6.2.1

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 3/6] Add new CACHELINE_ALIGNED_DATA linker script macro.
@ 2009-04-30 19:32       ` Tim Abbott
  0 siblings, 0 replies; 37+ messages in thread
From: Tim Abbott @ 2009-04-30 19:32 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Anders Kaseorg, Waseem Daher, Denys Vlasenko, Jeff Arnold,
	Benjamin Herrenschmidt, Bryan Wu, Chris Zankel, Cyrill Gorcunov,
	David Howells, David S. Miller, dev-etrax, Geert Uytterhoeven,
	Greg Ungerer, Haavard Skinnemoen, Heiko Carstens, Helge Deller,
	Hirokazu Takata, H. Peter Anvin, Ingo Molnar, Jeff Dike,
	Jesper Nilsson, Kyle McMartin, Linus Torvalds, linux-alpha,
	linux-am33-list, linux-arm-kernel, linux-ia64, linux-m32r,
	linux-m68k, linux-mips, linux-parisc, linuxppc-dev, linux-s390,
	linux-sh, Martin Schwidefsky, Michal Simek, microblaze-uclinux,
	Mikael Starvik, Paul Mackerras, Paul Mundt, Ralf Baechle,
	Richard Henderson, Roman Zippel, Russell King, sparclinux,
	Thomas Gleixner, Tony Luck, uclinux-dist-devel,
	user-mode-linux-devel, Yoshinori Sato, Tim Abbott

This patch is preparation for replacing most ".data.cacheline_aligned"
in the kernel with macros, so that the section name can later be
changed without having to touch a lot of the kernel.

The long-term goal here is to be able to change the kernel's magic
section names to those that are compatible with -ffunction-sections
-fdata-sections.  This requires renaming all magic sections with names
of the form ".data.foo".

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: Sam Ravnborg <sam@ravnborg.org>
---
 include/asm-generic/vmlinux.lds.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index f5ebd2b..fa7801b 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -131,6 +131,10 @@
 	. = ALIGN(PAGE_SIZE);						\
 	__nosave_end = .;
 
+#define CACHELINE_ALIGNED_DATA(alignment)				\
+	. = ALIGN(alignment);						\
+	*(.data.cacheline_aligned)
+
 #define RO_DATA(align)							\
 	. = ALIGN((align));						\
 	.rodata           : AT(ADDR(.rodata) - LOAD_OFFSET) {		\
-- 
1.6.2.1

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 3/6] Add new CACHELINE_ALIGNED_DATA linker script macro.
@ 2009-04-30 19:32       ` Tim Abbott
  0 siblings, 0 replies; 37+ messages in thread
From: Tim Abbott @ 2009-04-30 19:32 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: linux-mips, linux-m68k, linux-ia64, linux-sh, Denys Vlasenko,
	Greg Ungerer, Jeff Arnold, linuxppc-dev, Paul Mackerras,
	H. Peter Anvin, sparclinux, Sam Ravnborg, Waseem Daher,
	linux-arm-kernel, linux-s390, Jesper Nilsson, linux-am33-list,
	Yoshinori Sato, Helge Deller, Ingo Molnar, Geert Uytterhoeven,
	microblaze-uclinux, Russell King, user-mode-linux-devel,
	Heiko Carstens, Jeff Dike, dev-etrax, Mikael Starvik, Tony Luck,
	Tim Abbott, Cyrill Gorcunov, Michal Simek, Richard Henderson,
	Chris Zankel, Bryan Wu, linux-m32r, linux-parisc,
	Haavard Skinnemoen, Hirokazu Takata, Ralf Baechle,
	Anders Kaseorg, Kyle McMartin, Paul Mundt, Thomas Gleixner,
	linux-alpha, Martin Schwidefsky, uclinux-dist-devel,
	Linus Torvalds, David S. Miller

This patch is preparation for replacing most ".data.cacheline_aligned"
in the kernel with macros, so that the section name can later be
changed without having to touch a lot of the kernel.

The long-term goal here is to be able to change the kernel's magic
section names to those that are compatible with -ffunction-sections
-fdata-sections.  This requires renaming all magic sections with names
of the form ".data.foo".

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: Sam Ravnborg <sam@ravnborg.org>
---
 include/asm-generic/vmlinux.lds.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index f5ebd2b..fa7801b 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -131,6 +131,10 @@
 	. = ALIGN(PAGE_SIZE);						\
 	__nosave_end = .;
 
+#define CACHELINE_ALIGNED_DATA(alignment)				\
+	. = ALIGN(alignment);						\
+	*(.data.cacheline_aligned)
+
 #define RO_DATA(align)							\
 	. = ALIGN((align));						\
 	.rodata           : AT(ADDR(.rodata) - LOAD_OFFSET) {		\
-- 
1.6.2.1

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 4/6] Add new INIT_TASK_DATA() linker script macro.
  2009-04-30 19:32       ` Tim Abbott
  (?)
  (?)
@ 2009-04-30 19:32         ` Tim Abbott
  -1 siblings, 0 replies; 37+ messages in thread
From: Tim Abbott @ 2009-04-30 19:32 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Anders Kaseorg, Waseem Daher, Denys Vlasenko, Jeff Arnold,
	Benjamin Herrenschmidt, Bryan Wu, Chris Zankel, Cyrill Gorcunov,
	David Howells, David S. Miller, dev-etrax, Geert Uytterhoeven,
	Greg Ungerer, Haavard Skinnemoen, Heiko Carstens, Helge Deller,
	Hirokazu Takata, H. Peter Anvin, Ingo Molnar, Jeff Dike,
	Jesper Nilsson, Kyle McMartin, Linus Torvalds, linux-alpha

This patch is preparation for replacing most ".data.init_task" in the
kernel with macros, so that the section name can later be changed
without having to touch a lot of the kernel.

The long-term goal here is to be able to change the kernel's magic
section names to those that are compatible with -ffunction-sections
-fdata-sections.  This requires renaming all magic sections with names
of the form ".data.foo".

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: Sam Ravnborg <sam@ravnborg.org>
---
 include/asm-generic/vmlinux.lds.h |    4 ++++
 include/linux/init_task.h         |    3 +++
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index fa7801b..4b020e8 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -135,6 +135,10 @@
 	. = ALIGN(alignment);						\
 	*(.data.cacheline_aligned)
 
+#define INIT_TASK_DATA(alignment)					\
+	. = ALIGN(alignment);						\
+	*(.data.init_task)
+
 #define RO_DATA(align)							\
 	. = ALIGN((align));						\
 	.rodata           : AT(ADDR(.rodata) - LOAD_OFFSET) {		\
diff --git a/include/linux/init_task.h b/include/linux/init_task.h
index d87247d..e555baa 100644
--- a/include/linux/init_task.h
+++ b/include/linux/init_task.h
@@ -184,5 +184,8 @@ extern struct cred init_cred;
 	LIST_HEAD_INIT(cpu_timers[2]),					\
 }
 
+/* Attach to the init_task data structure for proper alignment */
+#define __init_task_data __attribute__((__section__(".data.init_task")))
+
 
 #endif
-- 
1.6.2.1

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 4/6] Add new INIT_TASK_DATA() linker script macro.
@ 2009-04-30 19:32         ` Tim Abbott
  0 siblings, 0 replies; 37+ messages in thread
From: Tim Abbott @ 2009-04-30 19:32 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Anders Kaseorg, Waseem Daher, Denys Vlasenko, Jeff Arnold,
	Benjamin Herrenschmidt, Bryan Wu, Chris Zankel, Cyrill Gorcunov,
	David Howells, David S. Miller, dev-etrax, Geert Uytterhoeven,
	Greg Ungerer, Haavard Skinnemoen, Heiko Carstens, Helge Deller,
	Hirokazu Takata, H. Peter Anvin, Ingo Molnar, Jeff Dike,
	Jesper Nilsson, Kyle McMartin, Linus Torvalds, linux-alpha,
	linux-am33-list, linux-arm-kernel, linux-ia64, linux-m32r,
	linux-m68k, linux-mips, linux-parisc, linuxppc-dev, linux-s390,
	linux-sh, Martin Schwidefsky, Michal Simek, microblaze-uclinux,
	Mikael Starvik, Paul Mackerras, Paul Mundt, Ralf Baechle,
	Richard Henderson, Roman Zippel, Russell King, sparclinux,
	Thomas Gleixner, Tony Luck, uclinux-dist-devel,
	user-mode-linux-devel, Yoshinori Sato, Tim Abbott, Sam Ravnborg

This patch is preparation for replacing most ".data.init_task" in the
kernel with macros, so that the section name can later be changed
without having to touch a lot of the kernel.

The long-term goal here is to be able to change the kernel's magic
section names to those that are compatible with -ffunction-sections
-fdata-sections.  This requires renaming all magic sections with names
of the form ".data.foo".

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: Sam Ravnborg <sam@ravnborg.org>
---
 include/asm-generic/vmlinux.lds.h |    4 ++++
 include/linux/init_task.h         |    3 +++
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index fa7801b..4b020e8 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -135,6 +135,10 @@
 	. = ALIGN(alignment);						\
 	*(.data.cacheline_aligned)
 
+#define INIT_TASK_DATA(alignment)					\
+	. = ALIGN(alignment);						\
+	*(.data.init_task)
+
 #define RO_DATA(align)							\
 	. = ALIGN((align));						\
 	.rodata           : AT(ADDR(.rodata) - LOAD_OFFSET) {		\
diff --git a/include/linux/init_task.h b/include/linux/init_task.h
index d87247d..e555baa 100644
--- a/include/linux/init_task.h
+++ b/include/linux/init_task.h
@@ -184,5 +184,8 @@ extern struct cred init_cred;
 	LIST_HEAD_INIT(cpu_timers[2]),					\
 }
 
+/* Attach to the init_task data structure for proper alignment */
+#define __init_task_data __attribute__((__section__(".data.init_task")))
+
 
 #endif
-- 
1.6.2.1

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 4/6] Add new INIT_TASK_DATA() linker script macro.
@ 2009-04-30 19:32         ` Tim Abbott
  0 siblings, 0 replies; 37+ messages in thread
From: Tim Abbott @ 2009-04-30 19:32 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Anders Kaseorg, Waseem Daher, Denys Vlasenko, Jeff Arnold,
	Benjamin Herrenschmidt, Bryan Wu, Chris Zankel, Cyrill Gorcunov,
	David Howells, David S. Miller, dev-etrax, Geert Uytterhoeven,
	Greg Ungerer, Haavard Skinnemoen, Heiko Carstens, Helge Deller,
	Hirokazu Takata, H. Peter Anvin, Ingo Molnar, Jeff Dike,
	Jesper Nilsson, Kyle McMartin, Linus Torvalds, linux-alpha,
	linux-am33-list, linux-arm-kernel, linux-ia64, linux-m32r,
	linux-m68k, linux-mips, linux-parisc, linuxppc-dev, linux-s390,
	linux-sh, Martin Schwidefsky, Michal Simek, microblaze-uclinux,
	Mikael Starvik, Paul Mackerras, Paul Mundt, Ralf Baechle,
	Richard Henderson, Roman Zippel, Russell King, sparclinux,
	Thomas Gleixner, Tony Luck, uclinux-dist-devel,
	user-mode-linux-devel, Yoshinori Sato, Tim Abbott

This patch is preparation for replacing most ".data.init_task" in the
kernel with macros, so that the section name can later be changed
without having to touch a lot of the kernel.

The long-term goal here is to be able to change the kernel's magic
section names to those that are compatible with -ffunction-sections
-fdata-sections.  This requires renaming all magic sections with names
of the form ".data.foo".

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: Sam Ravnborg <sam@ravnborg.org>
---
 include/asm-generic/vmlinux.lds.h |    4 ++++
 include/linux/init_task.h         |    3 +++
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index fa7801b..4b020e8 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -135,6 +135,10 @@
 	. = ALIGN(alignment);						\
 	*(.data.cacheline_aligned)
 
+#define INIT_TASK_DATA(alignment)					\
+	. = ALIGN(alignment);						\
+	*(.data.init_task)
+
 #define RO_DATA(align)							\
 	. = ALIGN((align));						\
 	.rodata           : AT(ADDR(.rodata) - LOAD_OFFSET) {		\
diff --git a/include/linux/init_task.h b/include/linux/init_task.h
index d87247d..e555baa 100644
--- a/include/linux/init_task.h
+++ b/include/linux/init_task.h
@@ -184,5 +184,8 @@ extern struct cred init_cred;
 	LIST_HEAD_INIT(cpu_timers[2]),					\
 }
 
+/* Attach to the init_task data structure for proper alignment */
+#define __init_task_data __attribute__((__section__(".data.init_task")))
+
 
 #endif
-- 
1.6.2.1

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 4/6] Add new INIT_TASK_DATA() linker script macro.
@ 2009-04-30 19:32         ` Tim Abbott
  0 siblings, 0 replies; 37+ messages in thread
From: Tim Abbott @ 2009-04-30 19:32 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: linux-mips, linux-m68k, linux-ia64, linux-sh, Denys Vlasenko,
	Greg Ungerer, Jeff Arnold, linuxppc-dev, Paul Mackerras,
	H. Peter Anvin, sparclinux, Sam Ravnborg, Waseem Daher,
	linux-arm-kernel, linux-s390, Jesper Nilsson, linux-am33-list,
	Yoshinori Sato, Helge Deller, Ingo Molnar, Geert Uytterhoeven,
	microblaze-uclinux, Russell King, user-mode-linux-devel,
	Heiko Carstens, Jeff Dike, dev-etrax, Mikael Starvik, Tony Luck,
	Tim Abbott, Cyrill Gorcunov, Michal Simek, Richard Henderson,
	Chris Zankel, Bryan Wu, linux-m32r, linux-parisc,
	Haavard Skinnemoen, Hirokazu Takata, Ralf Baechle,
	Anders Kaseorg, Kyle McMartin, Paul Mundt, Thomas Gleixner,
	linux-alpha, Martin Schwidefsky, uclinux-dist-devel,
	Linus Torvalds, David S. Miller

This patch is preparation for replacing most ".data.init_task" in the
kernel with macros, so that the section name can later be changed
without having to touch a lot of the kernel.

The long-term goal here is to be able to change the kernel's magic
section names to those that are compatible with -ffunction-sections
-fdata-sections.  This requires renaming all magic sections with names
of the form ".data.foo".

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: Sam Ravnborg <sam@ravnborg.org>
---
 include/asm-generic/vmlinux.lds.h |    4 ++++
 include/linux/init_task.h         |    3 +++
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index fa7801b..4b020e8 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -135,6 +135,10 @@
 	. = ALIGN(alignment);						\
 	*(.data.cacheline_aligned)
 
+#define INIT_TASK_DATA(alignment)					\
+	. = ALIGN(alignment);						\
+	*(.data.init_task)
+
 #define RO_DATA(align)							\
 	. = ALIGN((align));						\
 	.rodata           : AT(ADDR(.rodata) - LOAD_OFFSET) {		\
diff --git a/include/linux/init_task.h b/include/linux/init_task.h
index d87247d..e555baa 100644
--- a/include/linux/init_task.h
+++ b/include/linux/init_task.h
@@ -184,5 +184,8 @@ extern struct cred init_cred;
 	LIST_HEAD_INIT(cpu_timers[2]),					\
 }
 
+/* Attach to the init_task data structure for proper alignment */
+#define __init_task_data __attribute__((__section__(".data.init_task")))
+
 
 #endif
-- 
1.6.2.1

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 5/6] Add new READ_MOSTLY_DATA(align) linker script macro.
  2009-04-30 19:32         ` Tim Abbott
  (?)
  (?)
@ 2009-04-30 19:32           ` Tim Abbott
  -1 siblings, 0 replies; 37+ messages in thread
From: Tim Abbott @ 2009-04-30 19:32 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Anders Kaseorg, Waseem Daher, Denys Vlasenko, Jeff Arnold,
	Benjamin Herrenschmidt, Bryan Wu, Chris Zankel, Cyrill Gorcunov,
	David Howells, David S. Miller, dev-etrax, Geert Uytterhoeven,
	Greg Ungerer, Haavard Skinnemoen, Heiko Carstens, Helge Deller,
	Hirokazu Takata, H. Peter Anvin, Ingo Molnar, Jeff Dike,
	Jesper Nilsson, Kyle McMartin, Linus Torvalds, linux-alpha

This patch is preparation for replacing most ".data.read_mostly" in
the kernel with macros, so that the section name can later be changed
without having to touch a lot of the kernel.

The long-term goal here is to be able to change the kernel's magic
section names to those that are compatible with -ffunction-sections
-fdata-sections.  This requires renaming all magic sections with names
of the form ".data.foo".

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: Sam Ravnborg <sam@ravnborg.org>
---
 include/asm-generic/vmlinux.lds.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 4b020e8..a4b4f4a 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -139,6 +139,10 @@
 	. = ALIGN(alignment);						\
 	*(.data.init_task)
 
+#define READ_MOSTLY_DATA(alignment)					\
+	. = ALIGN(alignment);						\
+	*(.data.read_mostly)
+
 #define RO_DATA(align)							\
 	. = ALIGN((align));						\
 	.rodata           : AT(ADDR(.rodata) - LOAD_OFFSET) {		\
-- 
1.6.2.1

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 5/6] Add new READ_MOSTLY_DATA(align) linker script macro.
@ 2009-04-30 19:32           ` Tim Abbott
  0 siblings, 0 replies; 37+ messages in thread
From: Tim Abbott @ 2009-04-30 19:32 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Anders Kaseorg, Waseem Daher, Denys Vlasenko, Jeff Arnold,
	Benjamin Herrenschmidt, Bryan Wu, Chris Zankel, Cyrill Gorcunov,
	David Howells, David S. Miller, dev-etrax, Geert Uytterhoeven,
	Greg Ungerer, Haavard Skinnemoen, Heiko Carstens, Helge Deller,
	Hirokazu Takata, H. Peter Anvin, Ingo Molnar, Jeff Dike,
	Jesper Nilsson, Kyle McMartin, Linus Torvalds, linux-alpha,
	linux-am33-list, linux-arm-kernel, linux-ia64, linux-m32r,
	linux-m68k, linux-mips, linux-parisc, linuxppc-dev, linux-s390,
	linux-sh, Martin Schwidefsky, Michal Simek, microblaze-uclinux,
	Mikael Starvik, Paul Mackerras, Paul Mundt, Ralf Baechle,
	Richard Henderson, Roman Zippel, Russell King, sparclinux,
	Thomas Gleixner, Tony Luck, uclinux-dist-devel,
	user-mode-linux-devel, Yoshinori Sato, Tim Abbott, Sam Ravnborg

This patch is preparation for replacing most ".data.read_mostly" in
the kernel with macros, so that the section name can later be changed
without having to touch a lot of the kernel.

The long-term goal here is to be able to change the kernel's magic
section names to those that are compatible with -ffunction-sections
-fdata-sections.  This requires renaming all magic sections with names
of the form ".data.foo".

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: Sam Ravnborg <sam@ravnborg.org>
---
 include/asm-generic/vmlinux.lds.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 4b020e8..a4b4f4a 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -139,6 +139,10 @@
 	. = ALIGN(alignment);						\
 	*(.data.init_task)
 
+#define READ_MOSTLY_DATA(alignment)					\
+	. = ALIGN(alignment);						\
+	*(.data.read_mostly)
+
 #define RO_DATA(align)							\
 	. = ALIGN((align));						\
 	.rodata           : AT(ADDR(.rodata) - LOAD_OFFSET) {		\
-- 
1.6.2.1

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 5/6] Add new READ_MOSTLY_DATA(align) linker script macro.
@ 2009-04-30 19:32           ` Tim Abbott
  0 siblings, 0 replies; 37+ messages in thread
From: Tim Abbott @ 2009-04-30 19:32 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Anders Kaseorg, Waseem Daher, Denys Vlasenko, Jeff Arnold,
	Benjamin Herrenschmidt, Bryan Wu, Chris Zankel, Cyrill Gorcunov,
	David Howells, David S. Miller, dev-etrax, Geert Uytterhoeven,
	Greg Ungerer, Haavard Skinnemoen, Heiko Carstens, Helge Deller,
	Hirokazu Takata, H. Peter Anvin, Ingo Molnar, Jeff Dike,
	Jesper Nilsson, Kyle McMartin, Linus Torvalds, linux-alpha,
	linux-am33-list, linux-arm-kernel, linux-ia64, linux-m32r,
	linux-m68k, linux-mips, linux-parisc, linuxppc-dev, linux-s390,
	linux-sh, Martin Schwidefsky, Michal Simek, microblaze-uclinux,
	Mikael Starvik, Paul Mackerras, Paul Mundt, Ralf Baechle,
	Richard Henderson, Roman Zippel, Russell King, sparclinux,
	Thomas Gleixner, Tony Luck, uclinux-dist-devel,
	user-mode-linux-devel, Yoshinori Sato, Tim Abbott

This patch is preparation for replacing most ".data.read_mostly" in
the kernel with macros, so that the section name can later be changed
without having to touch a lot of the kernel.

The long-term goal here is to be able to change the kernel's magic
section names to those that are compatible with -ffunction-sections
-fdata-sections.  This requires renaming all magic sections with names
of the form ".data.foo".

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: Sam Ravnborg <sam@ravnborg.org>
---
 include/asm-generic/vmlinux.lds.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 4b020e8..a4b4f4a 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -139,6 +139,10 @@
 	. = ALIGN(alignment);						\
 	*(.data.init_task)
 
+#define READ_MOSTLY_DATA(alignment)					\
+	. = ALIGN(alignment);						\
+	*(.data.read_mostly)
+
 #define RO_DATA(align)							\
 	. = ALIGN((align));						\
 	.rodata           : AT(ADDR(.rodata) - LOAD_OFFSET) {		\
-- 
1.6.2.1

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 5/6] Add new READ_MOSTLY_DATA(align) linker script macro.
@ 2009-04-30 19:32           ` Tim Abbott
  0 siblings, 0 replies; 37+ messages in thread
From: Tim Abbott @ 2009-04-30 19:32 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: linux-mips, linux-m68k, linux-ia64, linux-sh, Denys Vlasenko,
	Greg Ungerer, Jeff Arnold, linuxppc-dev, Paul Mackerras,
	H. Peter Anvin, sparclinux, Sam Ravnborg, Waseem Daher,
	linux-arm-kernel, linux-s390, Jesper Nilsson, linux-am33-list,
	Yoshinori Sato, Helge Deller, Ingo Molnar, Geert Uytterhoeven,
	microblaze-uclinux, Russell King, user-mode-linux-devel,
	Heiko Carstens, Jeff Dike, dev-etrax, Mikael Starvik, Tony Luck,
	Tim Abbott, Cyrill Gorcunov, Michal Simek, Richard Henderson,
	Chris Zankel, Bryan Wu, linux-m32r, linux-parisc,
	Haavard Skinnemoen, Hirokazu Takata, Ralf Baechle,
	Anders Kaseorg, Kyle McMartin, Paul Mundt, Thomas Gleixner,
	linux-alpha, Martin Schwidefsky, uclinux-dist-devel,
	Linus Torvalds, David S. Miller

This patch is preparation for replacing most ".data.read_mostly" in
the kernel with macros, so that the section name can later be changed
without having to touch a lot of the kernel.

The long-term goal here is to be able to change the kernel's magic
section names to those that are compatible with -ffunction-sections
-fdata-sections.  This requires renaming all magic sections with names
of the form ".data.foo".

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: Sam Ravnborg <sam@ravnborg.org>
---
 include/asm-generic/vmlinux.lds.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 4b020e8..a4b4f4a 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -139,6 +139,10 @@
 	. = ALIGN(alignment);						\
 	*(.data.init_task)
 
+#define READ_MOSTLY_DATA(alignment)					\
+	. = ALIGN(alignment);						\
+	*(.data.read_mostly)
+
 #define RO_DATA(align)							\
 	. = ALIGN((align));						\
 	.rodata           : AT(ADDR(.rodata) - LOAD_OFFSET) {		\
-- 
1.6.2.1

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 6/6] Add support for __read_mostly to linux/cache.h
  2009-04-30 19:32           ` Tim Abbott
  (?)
@ 2009-04-30 19:32             ` Tim Abbott
  -1 siblings, 0 replies; 37+ messages in thread
From: Tim Abbott @ 2009-04-30 19:32 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Anders Kaseorg, Waseem Daher, Denys Vlasenko, Jeff Arnold,
	Benjamin Herrenschmidt, Bryan Wu, Chris Zankel, Cyrill Gorcunov,
	David Howells, David S. Miller, dev-etrax, Geert Uytterhoeven,
	Greg Ungerer, Haavard Skinnemoen, Heiko Carstens, Helge Deller,
	Hirokazu Takata, H. Peter Anvin, Ingo Molnar, Jeff Dike,
	Jesper Nilsson, Kyle McMartin, Linus Torvalds, linux-alpha

Signed-off-by: Tim Abbott <tabbott@mit.edu>
---
 include/linux/cache.h |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/include/linux/cache.h b/include/linux/cache.h
index 97e2488..99d8a6f 100644
--- a/include/linux/cache.h
+++ b/include/linux/cache.h
@@ -13,7 +13,13 @@
 #endif
 
 #ifndef __read_mostly
+#ifdef CONFIG_HAVE_READ_MOSTLY_DATA
+#define __read_mostly __attribute__((__section__(".data.read_mostly")))
+#define __READ_MOSTLY .section ".data.read_mostly", "aw"
+#else
 #define __read_mostly
+#define __READ_MOSTLY
+#endif /* CONFIG_HAVE_READ_MOSTLY_DATA */
 #endif
 
 #ifndef ____cacheline_aligned
-- 
1.6.2.1

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 6/6] Add support for __read_mostly to linux/cache.h
@ 2009-04-30 19:32             ` Tim Abbott
  0 siblings, 0 replies; 37+ messages in thread
From: Tim Abbott @ 2009-04-30 19:32 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Anders Kaseorg, Waseem Daher, Denys Vlasenko, Jeff Arnold,
	Benjamin Herrenschmidt, Bryan Wu, Chris Zankel, Cyrill Gorcunov,
	David Howells, David S. Miller, dev-etrax, Geert Uytterhoeven,
	Greg Ungerer, Haavard Skinnemoen, Heiko Carstens, Helge Deller,
	Hirokazu Takata, H. Peter Anvin, Ingo Molnar, Jeff Dike,
	Jesper Nilsson, Kyle McMartin, Linus Torvalds, linux-alpha,
	linux-am33-list, linux-arm-kernel, linux-ia64, linux-m32r,
	linux-m68k, linux-mips, linux-parisc, linuxppc-dev, linux-s390,
	linux-sh, Martin Schwidefsky, Michal Simek, microblaze-uclinux,
	Mikael Starvik, Paul Mackerras, Paul Mundt, Ralf Baechle,
	Richard Henderson, Roman Zippel, Russell King, sparclinux,
	Thomas Gleixner, Tony Luck, uclinux-dist-devel,
	user-mode-linux-devel, Yoshinori Sato, Tim Abbott

Signed-off-by: Tim Abbott <tabbott@mit.edu>
---
 include/linux/cache.h |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/include/linux/cache.h b/include/linux/cache.h
index 97e2488..99d8a6f 100644
--- a/include/linux/cache.h
+++ b/include/linux/cache.h
@@ -13,7 +13,13 @@
 #endif
 
 #ifndef __read_mostly
+#ifdef CONFIG_HAVE_READ_MOSTLY_DATA
+#define __read_mostly __attribute__((__section__(".data.read_mostly")))
+#define __READ_MOSTLY .section ".data.read_mostly", "aw"
+#else
 #define __read_mostly
+#define __READ_MOSTLY
+#endif /* CONFIG_HAVE_READ_MOSTLY_DATA */
 #endif
 
 #ifndef ____cacheline_aligned
-- 
1.6.2.1

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 6/6] Add support for __read_mostly to linux/cache.h
@ 2009-04-30 19:32             ` Tim Abbott
  0 siblings, 0 replies; 37+ messages in thread
From: Tim Abbott @ 2009-04-30 19:32 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: linux-mips, linux-m68k, linux-ia64, linux-sh, Denys Vlasenko,
	Greg Ungerer, Jeff Arnold, linuxppc-dev, Paul Mackerras,
	H. Peter Anvin, sparclinux, Waseem Daher, linux-arm-kernel,
	linux-s390, Jesper Nilsson, linux-am33-list, Yoshinori Sato,
	Helge Deller, Ingo Molnar, Geert Uytterhoeven,
	microblaze-uclinux, Russell King, user-mode-linux-devel,
	Heiko Carstens, Jeff Dike, dev-etrax, Mikael Starvik, Tony Luck,
	Tim Abbott, Cyrill Gorcunov, Michal Simek, Richard Henderson,
	Chris Zankel, Bryan Wu, linux-m32r, linux-parisc,
	Haavard Skinnemoen, Hirokazu Takata, Ralf Baechle,
	Anders Kaseorg, Kyle McMartin, Paul Mundt, Thomas Gleixner,
	linux-alpha, Martin Schwidefsky, uclinux-dist-devel,
	Linus Torvalds, David S. Miller

Signed-off-by: Tim Abbott <tabbott@mit.edu>
---
 include/linux/cache.h |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/include/linux/cache.h b/include/linux/cache.h
index 97e2488..99d8a6f 100644
--- a/include/linux/cache.h
+++ b/include/linux/cache.h
@@ -13,7 +13,13 @@
 #endif
 
 #ifndef __read_mostly
+#ifdef CONFIG_HAVE_READ_MOSTLY_DATA
+#define __read_mostly __attribute__((__section__(".data.read_mostly")))
+#define __READ_MOSTLY .section ".data.read_mostly", "aw"
+#else
 #define __read_mostly
+#define __READ_MOSTLY
+#endif /* CONFIG_HAVE_READ_MOSTLY_DATA */
 #endif
 
 #ifndef ____cacheline_aligned
-- 
1.6.2.1

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* Re: [PATCH 6/6] Add support for __read_mostly to linux/cache.h
  2009-04-30 19:32             ` Tim Abbott
  (?)
@ 2009-05-01  9:44               ` Sam Ravnborg
  -1 siblings, 0 replies; 37+ messages in thread
From: Sam Ravnborg @ 2009-05-01  9:44 UTC (permalink / raw)
  To: Tim Abbott, Christoph Lameter
  Cc: Anders Kaseorg, Waseem Daher, Denys Vlasenko, Jeff Arnold,
	Benjamin Herrenschmidt, Bryan Wu, Chris Zankel, Cyrill Gorcunov,
	David Howells, David S. Miller, dev-etrax, Geert Uytterhoeven,
	Greg Ungerer, Haavard Skinnemoen, Heiko Carstens, Helge Deller,
	Hirokazu Takata, H. Peter Anvin, Ingo Molnar, Jeff Dike,
	Jesper Nilsson, Kyle McMartin, Linus Torvalds, linux-alpha

On Thu, Apr 30, 2009 at 03:32:36PM -0400, Tim Abbott wrote:
> Signed-off-by: Tim Abbott <tabbott@mit.edu>
> ---
>  include/linux/cache.h |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/include/linux/cache.h b/include/linux/cache.h
> index 97e2488..99d8a6f 100644
> --- a/include/linux/cache.h
> +++ b/include/linux/cache.h
> @@ -13,7 +13,13 @@
>  #endif
>  
>  #ifndef __read_mostly
> +#ifdef CONFIG_HAVE_READ_MOSTLY_DATA
> +#define __read_mostly __attribute__((__section__(".data.read_mostly")))
> +#define __READ_MOSTLY .section ".data.read_mostly", "aw"
> +#else
>  #define __read_mostly
> +#define __READ_MOSTLY
> +#endif /* CONFIG_HAVE_READ_MOSTLY_DATA */
>  #endif

Are there any specific reason why we do not support read_mostly on all
architectures?

read_mostly is about grouping rarely written data together
so what is needed is to introduce this section in the remaining
archtectures.

Christoph - git log says you did the inital implmentation.
Do you agree?

	Sam

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 6/6] Add support for __read_mostly to linux/cache.h
@ 2009-05-01  9:44               ` Sam Ravnborg
  0 siblings, 0 replies; 37+ messages in thread
From: Sam Ravnborg @ 2009-05-01  9:44 UTC (permalink / raw)
  To: Tim Abbott, Christoph Lameter
  Cc: Anders Kaseorg, Waseem Daher, Denys Vlasenko, Jeff Arnold,
	Benjamin Herrenschmidt, Bryan Wu, Chris Zankel, Cyrill Gorcunov,
	David Howells, David S. Miller, dev-etrax, Geert Uytterhoeven,
	Greg Ungerer, Haavard Skinnemoen, Heiko Carstens, Helge Deller,
	Hirokazu Takata, H. Peter Anvin, Ingo Molnar, Jeff Dike,
	Jesper Nilsson, Kyle McMartin, Linus Torvalds, linux-alpha,
	linux-am33-list, linux-arm-kernel, linux-ia64, linux-m32r,
	linux-m68k, linux-mips, linux-parisc, linuxppc-dev, linux-s390,
	linux-sh, Martin Schwidefsky, Michal Simek, microblaze-uclinux,
	Mikael Starvik, Paul Mackerras, Paul Mundt, Ralf Baechle,
	Richard Henderson, Roman Zippel, Russell King, sparclinux,
	Thomas Gleixner, Tony Luck, uclinux-dist-devel,
	user-mode-linux-devel, Yoshinori Sato

On Thu, Apr 30, 2009 at 03:32:36PM -0400, Tim Abbott wrote:
> Signed-off-by: Tim Abbott <tabbott@mit.edu>
> ---
>  include/linux/cache.h |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/include/linux/cache.h b/include/linux/cache.h
> index 97e2488..99d8a6f 100644
> --- a/include/linux/cache.h
> +++ b/include/linux/cache.h
> @@ -13,7 +13,13 @@
>  #endif
>  
>  #ifndef __read_mostly
> +#ifdef CONFIG_HAVE_READ_MOSTLY_DATA
> +#define __read_mostly __attribute__((__section__(".data.read_mostly")))
> +#define __READ_MOSTLY .section ".data.read_mostly", "aw"
> +#else
>  #define __read_mostly
> +#define __READ_MOSTLY
> +#endif /* CONFIG_HAVE_READ_MOSTLY_DATA */
>  #endif

Are there any specific reason why we do not support read_mostly on all
architectures?

read_mostly is about grouping rarely written data together
so what is needed is to introduce this section in the remaining
archtectures.

Christoph - git log says you did the inital implmentation.
Do you agree?

	Sam

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 6/6] Add support for __read_mostly to linux/cache.h
@ 2009-05-01  9:44               ` Sam Ravnborg
  0 siblings, 0 replies; 37+ messages in thread
From: Sam Ravnborg @ 2009-05-01  9:44 UTC (permalink / raw)
  To: Tim Abbott, Christoph Lameter
  Cc: linux-mips, linux-m68k, linux-ia64, linux-sh, Denys Vlasenko,
	Greg Ungerer, Jeff Arnold, linuxppc-dev, Paul Mackerras,
	H. Peter Anvin, sparclinux, Waseem Daher, linux-arm-kernel,
	linux-s390, Jesper Nilsson, linux-am33-list, Yoshinori Sato,
	Helge Deller, Ingo Molnar, Geert Uytterhoeven,
	microblaze-uclinux, Russell King, user-mode-linux-devel,
	Heiko Carstens, Jeff Dike, dev-etrax, Mikael Starvik, Tony Luck,
	Cyrill Gorcunov, Michal Simek, Richard Henderson, Chris Zankel,
	Bryan Wu, linux-m32r, linux-parisc, Haavard Skinnemoen,
	Hirokazu Takata, Ralf Baechle, Anders Kaseorg, Kyle McMartin,
	Paul Mundt, Thomas Gleixner, linux-alpha, Martin Schwidefsky,
	uclinux-dist-devel, Linus Torvalds, David S. Miller

On Thu, Apr 30, 2009 at 03:32:36PM -0400, Tim Abbott wrote:
> Signed-off-by: Tim Abbott <tabbott@mit.edu>
> ---
>  include/linux/cache.h |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/include/linux/cache.h b/include/linux/cache.h
> index 97e2488..99d8a6f 100644
> --- a/include/linux/cache.h
> +++ b/include/linux/cache.h
> @@ -13,7 +13,13 @@
>  #endif
>  
>  #ifndef __read_mostly
> +#ifdef CONFIG_HAVE_READ_MOSTLY_DATA
> +#define __read_mostly __attribute__((__section__(".data.read_mostly")))
> +#define __READ_MOSTLY .section ".data.read_mostly", "aw"
> +#else
>  #define __read_mostly
> +#define __READ_MOSTLY
> +#endif /* CONFIG_HAVE_READ_MOSTLY_DATA */
>  #endif

Are there any specific reason why we do not support read_mostly on all
architectures?

read_mostly is about grouping rarely written data together
so what is needed is to introduce this section in the remaining
archtectures.

Christoph - git log says you did the inital implmentation.
Do you agree?

	Sam

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 6/6] Add support for __read_mostly to linux/cache.h
       [not found]               ` <20090501094407.GD18326-QabhHTsIXMSnlFQ6Q1D1Y0B+6BGkLq7r@public.gmane.org>
  2009-05-01 13:52                   ` Christoph Lameter
  (?)
@ 2009-05-01 13:52                   ` Christoph Lameter
  0 siblings, 0 replies; 37+ messages in thread
From: Christoph Lameter @ 2009-05-01 13:52 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Tim Abbott, Anders Kaseorg, Waseem Daher, Denys Vlasenko,
	Jeff Arnold, Benjamin Herrenschmidt, Bryan Wu, Chris Zankel,
	Cyrill Gorcunov, David Howells, David S. Miller,
	dev-etrax-VrBV9hrLPhE, Geert Uytterhoeven, Greg Ungerer,
	Haavard Skinnemoen, Heiko Carstens, Helge Deller,
	Hirokazu Takata, H. Peter Anvin, Ingo Molnar, Jeff Dike, Jesper

On Fri, 1 May 2009, Sam Ravnborg wrote:

> Are there any specific reason why we do not support read_mostly on all
> architectures?

Not that I know of.

> read_mostly is about grouping rarely written data together
> so what is needed is to introduce this section in the remaining
> archtectures.
>
> Christoph - git log says you did the inital implmentation.
> Do you agree?

Yes.

There is some concern that __read_mostly is needlessly applied to
numerous variables that are not used in hot code paths. This may make
__read_mostly ineffective and actually increase the cache footprint of a
function since global variables are no longer in the same cacheline. If
such a function is called and the caches are cold then two cacheline
fetches have to be done instead of one.

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 6/6] Add support for __read_mostly to linux/cache.h
@ 2009-05-01 13:52                   ` Christoph Lameter
  0 siblings, 0 replies; 37+ messages in thread
From: Christoph Lameter @ 2009-05-01 13:52 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Tim Abbott, Anders Kaseorg, Waseem Daher, Denys Vlasenko,
	Jeff Arnold, Benjamin Herrenschmidt, Bryan Wu, Chris Zankel,
	Cyrill Gorcunov, David Howells, David S. Miller,
	dev-etrax-VrBV9hrLPhE, Geert Uytterhoeven, Greg Ungerer,
	Haavard Skinnemoen, Heiko Carstens, Helge Deller,
	Hirokazu Takata, H. Peter Anvin, Ingo Molnar, Jeff Dike, Jesper

On Fri, 1 May 2009, Sam Ravnborg wrote:

> Are there any specific reason why we do not support read_mostly on all
> architectures?

Not that I know of.

> read_mostly is about grouping rarely written data together
> so what is needed is to introduce this section in the remaining
> archtectures.
>
> Christoph - git log says you did the inital implmentation.
> Do you agree?

Yes.

There is some concern that __read_mostly is needlessly applied to
numerous variables that are not used in hot code paths. This may make
__read_mostly ineffective and actually increase the cache footprint of a
function since global variables are no longer in the same cacheline. If
such a function is called and the caches are cold then two cacheline
fetches have to be done instead of one.

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 6/6] Add support for __read_mostly to linux/cache.h
@ 2009-05-01 13:52                   ` Christoph Lameter
  0 siblings, 0 replies; 37+ messages in thread
From: Christoph Lameter @ 2009-05-01 13:52 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Tim Abbott, Anders Kaseorg, Waseem Daher, Denys Vlasenko,
	Jeff Arnold, Benjamin Herrenschmidt, Bryan Wu, Chris Zankel,
	Cyrill Gorcunov, David Howells, David S. Miller, dev-etrax,
	Geert Uytterhoeven, Greg Ungerer, Haavard Skinnemoen,
	Heiko Carstens, Helge Deller, Hirokazu Takata, H. Peter Anvin,
	Ingo Molnar, Jeff Dike, Jesper Nilsson, Kyle McMartin,
	Linus Torvalds, linux-alpha, linux-am33-list, linux-arm-kernel,
	linux-ia64, linux-m32r, linux-m68k, linux-mips, linux-parisc,
	linuxppc-dev, linux-s390, linux-sh, Martin Schwidefsky,
	Michal Simek, microblaze-uclinux, Mikael Starvik, Paul Mackerras,
	Paul Mundt, Ralf Baechle, Richard Henderson, Roman Zippel,
	Russell King, sparclinux, Thomas Gleixner, Tony Luck,
	uclinux-dist-devel, user-mode-linux-devel, Yoshinori Sato

On Fri, 1 May 2009, Sam Ravnborg wrote:

> Are there any specific reason why we do not support read_mostly on all
> architectures?

Not that I know of.

> read_mostly is about grouping rarely written data together
> so what is needed is to introduce this section in the remaining
> archtectures.
>
> Christoph - git log says you did the inital implmentation.
> Do you agree?

Yes.

There is some concern that __read_mostly is needlessly applied to
numerous variables that are not used in hot code paths. This may make
__read_mostly ineffective and actually increase the cache footprint of a
function since global variables are no longer in the same cacheline. If
such a function is called and the caches are cold then two cacheline
fetches have to be done instead of one.

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 6/6] Add support for __read_mostly to linux/cache.h
@ 2009-05-01 13:52                   ` Christoph Lameter
  0 siblings, 0 replies; 37+ messages in thread
From: Christoph Lameter @ 2009-05-01 13:52 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: linux-mips, linux-m68k, linux-ia64, linux-sh, Denys Vlasenko,
	Greg Ungerer, Heiko Carstens, linuxppc-dev, Paul Mackerras,
	H. Peter Anvin, sparclinux, Thomas Gleixner, linux-arm-kernel,
	linux-s390, Jesper Nilsson, linux-am33-list, Yoshinori Sato,
	Helge Deller, Ingo Molnar, Geert Uytterhoeven, Russell King,
	user-mode-linux-devel, microblaze-uclinux, Jeff Dike,
	Jeff Arnold, dev-etrax, Mikael Starvik, Tony Luck,
	Cyrill Gorcunov, Michal Simek, Waseem Daher, Richard Henderson,
	Chris Zankel, Bryan Wu, linux-m32r, linux-parisc,
	Haavard Skinnemoen, Hirokazu Takata, Tim Abbott, Ralf Baechle,
	Anders Kaseorg, Kyle McMartin, Paul Mundt, linux-alpha,
	Martin Schwidefsky, uclinux-dist-devel, Linus Torvalds,
	David S. Miller

On Fri, 1 May 2009, Sam Ravnborg wrote:

> Are there any specific reason why we do not support read_mostly on all
> architectures?

Not that I know of.

> read_mostly is about grouping rarely written data together
> so what is needed is to introduce this section in the remaining
> archtectures.
>
> Christoph - git log says you did the inital implmentation.
> Do you agree?

Yes.

There is some concern that __read_mostly is needlessly applied to
numerous variables that are not used in hot code paths. This may make
__read_mostly ineffective and actually increase the cache footprint of a
function since global variables are no longer in the same cacheline. If
such a function is called and the caches are cold then two cacheline
fetches have to be done instead of one.

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [microblaze-uclinux] Re: [PATCH 6/6] Add support for __read_mostly to linux/cache.h
  2009-05-01 13:52                   ` Christoph Lameter
  (?)
  (?)
@ 2009-05-01 21:47                     ` Edgar E. Iglesias
  -1 siblings, 0 replies; 37+ messages in thread
From: Edgar E. Iglesias @ 2009-05-01 21:47 UTC (permalink / raw)
  To: Christoph Lameter
  Cc: Sam Ravnborg, Tim Abbott, Anders Kaseorg, Waseem Daher,
	Denys Vlasenko, Jeff Arnold, Benjamin Herrenschmidt, Bryan Wu,
	Chris Zankel, Cyrill Gorcunov, David Howells, David S. Miller,
	dev-etrax, Geert Uytterhoeven, Greg Ungerer, Haavard Skinnemoen,
	Heiko Carstens, Helge Deller, Hirokazu Takata, H. Peter Anvin,
	Ingo Molnar, Jeff Dike, Jesper Nilsson, Kyle McMartin, Linus

On Fri, May 01, 2009 at 09:52:18AM -0400, Christoph Lameter wrote:
> On Fri, 1 May 2009, Sam Ravnborg wrote:
> 
> > Are there any specific reason why we do not support read_mostly on all
> > architectures?
> 
> Not that I know of.
> 
> > read_mostly is about grouping rarely written data together
> > so what is needed is to introduce this section in the remaining
> > archtectures.
> >
> > Christoph - git log says you did the inital implmentation.
> > Do you agree?
> 
> Yes.
> 
> There is some concern that __read_mostly is needlessly applied to
> numerous variables that are not used in hot code paths. This may make
> __read_mostly ineffective and actually increase the cache footprint of a
> function since global variables are no longer in the same cacheline. If
> such a function is called and the caches are cold then two cacheline
> fetches have to be done instead of one.

FWIW I think that's a valid concern. Also, I think one can question the
value of __read_mostly for write-through caches, given the mentioned
concern it probably makes things worse for those. IMO there should be
a way to turn it off for arch's that know it's no good for them.

Cheers

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [microblaze-uclinux] Re: [PATCH 6/6] Add support for __read_mostly to linux/cache.h
@ 2009-05-01 21:47                     ` Edgar E. Iglesias
  0 siblings, 0 replies; 37+ messages in thread
From: Edgar E. Iglesias @ 2009-05-01 21:47 UTC (permalink / raw)
  To: Christoph Lameter
  Cc: Sam Ravnborg, Tim Abbott, Anders Kaseorg, Waseem Daher,
	Denys Vlasenko, Jeff Arnold, Benjamin Herrenschmidt, Bryan Wu,
	Chris Zankel, Cyrill Gorcunov, David Howells, David S. Miller,
	dev-etrax, Geert Uytterhoeven, Greg Ungerer, Haavard Skinnemoen,
	Heiko Carstens, Helge Deller, Hirokazu Takata, H. Peter Anvin,
	Ingo Molnar, Jeff Dike, Jesper Nilsson, Kyle McMartin, Linus

On Fri, May 01, 2009 at 09:52:18AM -0400, Christoph Lameter wrote:
> On Fri, 1 May 2009, Sam Ravnborg wrote:
> 
> > Are there any specific reason why we do not support read_mostly on all
> > architectures?
> 
> Not that I know of.
> 
> > read_mostly is about grouping rarely written data together
> > so what is needed is to introduce this section in the remaining
> > archtectures.
> >
> > Christoph - git log says you did the inital implmentation.
> > Do you agree?
> 
> Yes.
> 
> There is some concern that __read_mostly is needlessly applied to
> numerous variables that are not used in hot code paths. This may make
> __read_mostly ineffective and actually increase the cache footprint of a
> function since global variables are no longer in the same cacheline. If
> such a function is called and the caches are cold then two cacheline
> fetches have to be done instead of one.

FWIW I think that's a valid concern. Also, I think one can question the
value of __read_mostly for write-through caches, given the mentioned
concern it probably makes things worse for those. IMO there should be
a way to turn it off for arch's that know it's no good for them.

Cheers

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [microblaze-uclinux] Re: [PATCH 6/6] Add support for __read_mostly to linux/cache.h
@ 2009-05-01 21:47                     ` Edgar E. Iglesias
  0 siblings, 0 replies; 37+ messages in thread
From: Edgar E. Iglesias @ 2009-05-01 21:47 UTC (permalink / raw)
  To: Christoph Lameter
  Cc: Sam Ravnborg, Tim Abbott, Anders Kaseorg, Waseem Daher,
	Denys Vlasenko, Jeff Arnold, Benjamin Herrenschmidt, Bryan Wu,
	Chris Zankel, Cyrill Gorcunov, David Howells, David S. Miller,
	dev-etrax, Geert Uytterhoeven, Greg Ungerer, Haavard Skinnemoen,
	Heiko Carstens, Helge Deller, Hirokazu Takata, H. Peter Anvin,
	Ingo Molnar, Jeff Dike, Jesper Nilsson, Kyle McMartin,
	Linus Torvalds, linux-alpha, linux-am33-list, linux-arm-kernel,
	linux-ia64, linux-m32r, linux-m68k, linux-mips, linux-parisc,
	linuxppc-dev, linux-s390, linux-sh, Martin Schwidefsky,
	Michal Simek, microblaze-uclinux, Mikael Starvik, Paul Mackerras,
	Paul Mundt, Ralf Baechle, Richard Henderson, Roman Zippel,
	Russell King, sparclinux, Thomas Gleixner, Tony Luck,
	uclinux-dist-devel, user-mode-linux-devel, Yoshinori Sato

On Fri, May 01, 2009 at 09:52:18AM -0400, Christoph Lameter wrote:
> On Fri, 1 May 2009, Sam Ravnborg wrote:
> 
> > Are there any specific reason why we do not support read_mostly on all
> > architectures?
> 
> Not that I know of.
> 
> > read_mostly is about grouping rarely written data together
> > so what is needed is to introduce this section in the remaining
> > archtectures.
> >
> > Christoph - git log says you did the inital implmentation.
> > Do you agree?
> 
> Yes.
> 
> There is some concern that __read_mostly is needlessly applied to
> numerous variables that are not used in hot code paths. This may make
> __read_mostly ineffective and actually increase the cache footprint of a
> function since global variables are no longer in the same cacheline. If
> such a function is called and the caches are cold then two cacheline
> fetches have to be done instead of one.

FWIW I think that's a valid concern. Also, I think one can question the
value of __read_mostly for write-through caches, given the mentioned
concern it probably makes things worse for those. IMO there should be
a way to turn it off for arch's that know it's no good for them.

Cheers

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [microblaze-uclinux] Re: [PATCH 6/6] Add support for __read_mostly to linux/cache.h
@ 2009-05-01 21:47                     ` Edgar E. Iglesias
  0 siblings, 0 replies; 37+ messages in thread
From: Edgar E. Iglesias @ 2009-05-01 21:47 UTC (permalink / raw)
  To: Christoph Lameter
  Cc: linux-mips, linux-m68k, linux-ia64, linux-sh, Denys Vlasenko,
	Greg Ungerer, Heiko Carstens, linuxppc-dev, Paul Mackerras,
	H. Peter Anvin, sparclinux, Sam Ravnborg, Thomas Gleixner,
	linux-arm-kernel, linux-s390, Jesper Nilsson, linux-am33-list,
	Yoshinori Sato, Helge Deller, Ingo Molnar, Geert Uytterhoeven,
	Russell King, user-mode-linux-devel, microblaze-uclinux,
	Jeff Dike, Jeff Arnold, dev-etrax, Mikael Starvik, Tony Luck,
	Cyrill Gorcunov, Michal Simek, Waseem Daher, Richard Henderson,
	Chris Zankel, Bryan Wu, linux-m32r, linux-parisc,
	Haavard Skinnemoen, Hirokazu Takata, Tim Abbott, Ralf Baechle,
	Anders Kaseorg, Kyle McMartin, Paul Mundt, linux-alpha,
	Martin Schwidefsky, uclinux-dist-devel, Linus Torvalds,
	David S. Miller

On Fri, May 01, 2009 at 09:52:18AM -0400, Christoph Lameter wrote:
> On Fri, 1 May 2009, Sam Ravnborg wrote:
> 
> > Are there any specific reason why we do not support read_mostly on all
> > architectures?
> 
> Not that I know of.
> 
> > read_mostly is about grouping rarely written data together
> > so what is needed is to introduce this section in the remaining
> > archtectures.
> >
> > Christoph - git log says you did the inital implmentation.
> > Do you agree?
> 
> Yes.
> 
> There is some concern that __read_mostly is needlessly applied to
> numerous variables that are not used in hot code paths. This may make
> __read_mostly ineffective and actually increase the cache footprint of a
> function since global variables are no longer in the same cacheline. If
> such a function is called and the caches are cold then two cacheline
> fetches have to be done instead of one.

FWIW I think that's a valid concern. Also, I think one can question the
value of __read_mostly for write-through caches, given the mentioned
concern it probably makes things worse for those. IMO there should be
a way to turn it off for arch's that know it's no good for them.

Cheers

^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2009-05-01 21:55 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-30 19:32 [PATCH 0/6] macros for section name cleanup Tim Abbott
2009-04-30 19:32 ` Tim Abbott
2009-04-30 19:32 ` Tim Abbott
2009-04-30 19:32 ` [PATCH 1/6] Add new macros for page-aligned data and bss sections Tim Abbott
2009-04-30 19:32   ` Tim Abbott
2009-04-30 19:32   ` Tim Abbott
2009-04-30 19:32   ` Tim Abbott
2009-04-30 19:32   ` [PATCH 2/6] Add new NOSAVE_DATA linker script macro Tim Abbott
2009-04-30 19:32     ` Tim Abbott
2009-04-30 19:32     ` Tim Abbott
2009-04-30 19:32     ` Tim Abbott
2009-04-30 19:32     ` [PATCH 3/6] Add new CACHELINE_ALIGNED_DATA " Tim Abbott
2009-04-30 19:32       ` Tim Abbott
2009-04-30 19:32       ` Tim Abbott
2009-04-30 19:32       ` Tim Abbott
2009-04-30 19:32       ` [PATCH 4/6] Add new INIT_TASK_DATA() " Tim Abbott
2009-04-30 19:32         ` Tim Abbott
2009-04-30 19:32         ` Tim Abbott
2009-04-30 19:32         ` Tim Abbott
2009-04-30 19:32         ` [PATCH 5/6] Add new READ_MOSTLY_DATA(align) " Tim Abbott
2009-04-30 19:32           ` Tim Abbott
2009-04-30 19:32           ` Tim Abbott
2009-04-30 19:32           ` Tim Abbott
2009-04-30 19:32           ` [PATCH 6/6] Add support for __read_mostly to linux/cache.h Tim Abbott
2009-04-30 19:32             ` Tim Abbott
2009-04-30 19:32             ` Tim Abbott
2009-05-01  9:44             ` Sam Ravnborg
2009-05-01  9:44               ` Sam Ravnborg
2009-05-01  9:44               ` Sam Ravnborg
     [not found]               ` <20090501094407.GD18326-QabhHTsIXMSnlFQ6Q1D1Y0B+6BGkLq7r@public.gmane.org>
2009-05-01 13:52                 ` Christoph Lameter
2009-05-01 13:52                   ` Christoph Lameter
2009-05-01 13:52                   ` Christoph Lameter
2009-05-01 13:52                   ` Christoph Lameter
2009-05-01 21:47                   ` [microblaze-uclinux] " Edgar E. Iglesias
2009-05-01 21:47                     ` Edgar E. Iglesias
2009-05-01 21:47                     ` Edgar E. Iglesias
2009-05-01 21:47                     ` Edgar E. Iglesias

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.