[PATCH/RFC] Make certain timekeeping variables __read_mostly
Tony Breeds
tony at bakeyournoodle.com
Wed Jun 20 13:13:33 EST 2007
On Wed, Jun 20, 2007 at 12:02:11PM +1000, Tony Breeds wrote:
> Also this patch makes tb_to_ns_scale and tb_to_ns_shift static for good
> measure.
While we're ate it these 3 variables can be marked __read_mostly.
Depends on previous patch.
From: Tony Breeds <tony at bakeyournoodle.com>
These really are read mostly as they're only written to in time_init()
Signed-off-by: Tony Breeds <tony at bakeyournoodle.com>
---
There looks to be other variables that can be made read_mostly, I think
that's a job for another day though (perhaps while doing the static cleanup).
arch/powerpc/kernel/time.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Index: working/arch/powerpc/kernel/time.c
===================================================================
--- working.orig/arch/powerpc/kernel/time.c 2007-06-20 12:08:27.000000000 +1000
+++ working/arch/powerpc/kernel/time.c 2007-06-20 12:08:32.000000000 +1000
@@ -113,9 +113,9 @@ u64 ticklen_to_xs; /* 0.64 fraction */
DEFINE_SPINLOCK(rtc_lock);
EXPORT_SYMBOL_GPL(rtc_lock);
-static u64 tb_to_ns_scale;
-static unsigned tb_to_ns_shift;
-static unsigned long boot_tb;
+static u64 tb_to_ns_scale __read_mostly;
+static unsigned tb_to_ns_shift __read_mostly;
+static unsigned long boot_tb __read_mostly;
struct gettimeofday_struct do_gtod;
Yours Tony
linux.conf.au http://linux.conf.au/ || http://lca2008.linux.org.au/
Jan 28 - Feb 02 2008 The Australian Linux Technical Conference!
More information about the Linuxppc-dev
mailing list