public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2]percpu: introduce read mostly percpu API
@ 2010-10-20  3:07 Shaohua Li
  2010-10-20  5:18 ` Eric Dumazet
                   ` (2 more replies)
  0 siblings, 3 replies; 20+ messages in thread
From: Shaohua Li @ 2010-10-20  3:07 UTC (permalink / raw)
  To: lkml; +Cc: Ingo Molnar, hpa@zytor.com, Andi Kleen, Chen, Tim C

Add a new readmostly percpu section and api, next patch will use it.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
---
 include/asm-generic/vmlinux.lds.h |    4 ++++
 include/linux/percpu-defs.h       |    9 +++++++++
 2 files changed, 13 insertions(+)

Index: linux/include/asm-generic/vmlinux.lds.h
===================================================================
--- linux.orig/include/asm-generic/vmlinux.lds.h	2010-10-20 09:32:52.000000000 +0800
+++ linux/include/asm-generic/vmlinux.lds.h	2010-10-20 10:03:38.000000000 +0800
@@ -677,6 +677,8 @@
 				- LOAD_OFFSET) {			\
 		VMLINUX_SYMBOL(__per_cpu_start) = .;			\
 		*(.data..percpu..first)					\
+		. = ALIGN(PAGE_SIZE);					\
+		*(.data..percpu..readmostly)				\
 		*(.data..percpu..page_aligned)				\
 		*(.data..percpu)					\
 		*(.data..percpu..shared_aligned)			\
@@ -703,6 +705,8 @@
 		VMLINUX_SYMBOL(__per_cpu_load) = .;			\
 		VMLINUX_SYMBOL(__per_cpu_start) = .;			\
 		*(.data..percpu..first)					\
+		. = ALIGN(PAGE_SIZE);					\
+		*(.data..percpu..readmostly)				\
 		*(.data..percpu..page_aligned)				\
 		*(.data..percpu)					\
 		*(.data..percpu..shared_aligned)			\
Index: linux/include/linux/percpu-defs.h
===================================================================
--- linux.orig/include/linux/percpu-defs.h	2010-10-20 09:14:27.000000000 +0800
+++ linux/include/linux/percpu-defs.h	2010-10-20 09:17:08.000000000 +0800
@@ -139,6 +139,15 @@
 	__aligned(PAGE_SIZE)
 
 /*
+ * Declaration/definition used for per-CPU variables that must be read mostly.
+ */
+#define DECLARE_PER_CPU_READ_MOSTLY(type, name)			\
+	DECLARE_PER_CPU_SECTION(type, name, "..readmostly")
+
+#define DEFINE_PER_CPU_READ_MOSTLY(type, name)				\
+	DEFINE_PER_CPU_SECTION(type, name, "..readmostly")
+
+/*
  * Intermodule exports for per-CPU variables.  sparse forgets about
  * address space across EXPORT_SYMBOL(), change EXPORT_SYMBOL() to
  * noop if __CHECKER__.



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

end of thread, other threads:[~2010-10-21  7:41 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-20  3:07 [PATCH 1/2]percpu: introduce read mostly percpu API Shaohua Li
2010-10-20  5:18 ` Eric Dumazet
2010-10-20  6:00   ` H. Peter Anvin
2010-10-20  7:35   ` Andi Kleen
2010-10-20  7:53     ` Eric Dumazet
2010-10-20 21:38       ` H. Peter Anvin
2010-10-20 21:42         ` H. Peter Anvin
2010-10-20 21:33   ` H. Peter Anvin
2010-10-20 23:06 ` [tip:x86/mm] percpu: Introduce a read-mostly " tip-bot for Shaohua Li
2010-10-21  1:38   ` Shaohua Li
2010-10-21  2:53     ` H. Peter Anvin
2010-10-21  5:33     ` Eric Dumazet
2010-10-21  5:54       ` H. Peter Anvin
2010-10-21  6:07         ` Eric Dumazet
2010-10-21  6:09           ` H. Peter Anvin
2010-10-21  6:17             ` Shaohua Li
2010-10-21  6:48               ` Eric Dumazet
2010-10-21  6:54                 ` H. Peter Anvin
2010-10-21  6:10   ` H. Peter Anvin
2010-10-21  7:40 ` [tip:x86/mm] x86-32, percpu: Correct the ordering of the percpu readmostly section tip-bot for H. Peter Anvin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox