From: Paul Jackson <pj@sgi.com>
To: akpm@osdl.org
Cc: Eric Dumazet <dada1@cosmosbay.com>,
linux-kernel@vger.kernel.org,
Nick Piggin <nickpiggin@yahoo.com.au>,
Simon Derr <Simon.Derr@bull.net>, Andi Kleen <ak@suse.de>,
Paul Jackson <pj@sgi.com>, Christoph Lameter <clameter@sgi.com>
Subject: [PATCH 03/04] Cpuset: mark number_of_cpusets read_mostly
Date: Wed, 14 Dec 2005 00:40:43 -0800 (PST) [thread overview]
Message-ID: <20051214084043.21054.37648.sendpatchset@jackhammer.engr.sgi.com> (raw)
In-Reply-To: <20051214084031.21054.13829.sendpatchset@jackhammer.engr.sgi.com>
Mark cpuset global 'number_of_cpusets' as __read_mostly.
This global is accessed everytime a zone is considered
in the zonelist loops beneath __alloc_pages, looking for
a free memory page. If number_of_cpusets is just one,
then we can short circuit the mems_allowed check.
Since this global is read alot on a hot path, and written
rarely, it is an excellent candidate for __read_mostly.
Thanks to Christoph Lameter for the suggestion.
Signed-off-by: Paul Jackson <pj@sgi.com>
---
kernel/cpuset.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
--- 2.6.15-rc3-mm1.orig/kernel/cpuset.c 2005-12-13 18:08:26.644979252 -0800
+++ 2.6.15-rc3-mm1/kernel/cpuset.c 2005-12-13 18:09:55.658647865 -0800
@@ -62,7 +62,7 @@
* When there is only one cpuset (the root cpuset) we can
* short circuit some hooks.
*/
-int number_of_cpusets;
+int number_of_cpusets __read_mostly;
/* See "Frequency meter" comments, below. */
--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@sgi.com> 1.650.933.1373
next prev parent reply other threads:[~2005-12-14 8:41 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-14 8:40 [PATCH 01/04] Cpuset: remove rcu slab cache optimization Paul Jackson
2005-12-14 8:40 ` [PATCH 02/04] Cpuset: use rcu directly optimization Paul Jackson
2005-12-16 17:55 ` Paul E. McKenney
2005-12-16 20:22 ` Paul Jackson
2005-12-14 8:40 ` Paul Jackson [this message]
2005-12-14 8:40 ` [PATCH 04/04] Cpuset: skip rcu check if task is in root cpuset Paul Jackson
2005-12-16 17:52 ` Paul E. McKenney
2005-12-16 20:06 ` Paul Jackson
2005-12-17 16:47 ` Paul E. McKenney
2005-12-19 14:48 ` Paul Jackson
2005-12-19 16:04 ` CONFIG_DEBUG_PREEMPT (was: [PATCH 04/04] Cpuset: skip rcu check ...) Paul Jackson
2005-12-19 16:39 ` Greg Edwards
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=20051214084043.21054.37648.sendpatchset@jackhammer.engr.sgi.com \
--to=pj@sgi.com \
--cc=Simon.Derr@bull.net \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=clameter@sgi.com \
--cc=dada1@cosmosbay.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nickpiggin@yahoo.com.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome