From: Eial Czerwacki <eial@scalemp.com>
To: linux-kernel@vger.kernel.org
Cc: "Shai Fultheim (Shai@ScaleMP.com)" <Shai@scalemp.com>
Subject: [PATCH] Move mostly read variables to __read_mostly section.
Date: Sun, 23 Oct 2011 20:23:52 +0200 [thread overview]
Message-ID: <4EA45BB8.20505@scalemp.com> (raw)
Move mostly read variables to __read_mostly section.
Signed-off-by: Eial Czerwacki<eial@ScaleMP.com>
Signed-off-by: Shai Fultheim<Shai@ScaleMP.com>
---
--- a/fs/buffer.c 2010-05-12 14:59:32.000000000 -0700
+++ b/fs/buffer.c 2010-05-24 11:56:32.000000000 -0700
@@ -3233,7 +3233,7 @@ SYSCALL_DEFINE2(bdflush, int, func, long
/*
* Buffer-head allocation
*/
-static struct kmem_cache *bh_cachep;
+static struct kmem_cache __read_mostly *bh_cachep;
/*
* Once the number of bh's in the machine exceeds this level, we start
--- a/kernel/time/timekeeping.c 2010-05-12 14:59:32.000000000 -0700
+++ b/kernel/time/timekeeping.c 2010-05-24 11:56:32.000000000 -0700
@@ -154,7 +154,7 @@ __cacheline_aligned_in_smp DEFINE_SEQLOC
* used instead.
*/
static struct timespec xtime __attribute__ ((aligned (16)));
-static struct timespec wall_to_monotonic __attribute__ ((aligned (16)));
+static struct timespec wall_to_monotonic __attribute__ ((aligned (16))) __read_mostly;
static struct timespec total_sleep_time;
/*
next reply other threads:[~2011-10-23 19:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-23 18:23 Eial Czerwacki [this message]
2011-10-24 4:47 ` [PATCH] Move mostly read variables to __read_mostly section Andi Kleen
2011-10-25 7:25 ` Eial Czerwacki
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=4EA45BB8.20505@scalemp.com \
--to=eial@scalemp.com \
--cc=Shai@scalemp.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 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.