summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorPaul Jackson <pj@sgi.com>2006-01-08 12:02:03 +0300
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-09 07:13:45 +0300
commit7edc59628b2f5d6516b4677b3b56f5f056e45cd9 (patch)
treecc0f07bc07156c6f805a72c39ae2d5655a97fede /kernel
parent6b9c2603ce07f70de9c7a8d335ecd028e8ff11f3 (diff)
downloadlinux-7edc59628b2f5d6516b4677b3b56f5f056e45cd9.tar.xz
[PATCH] cpuset: mark number_of_cpusets read_mostly
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> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/cpuset.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index 6fe28d6f282b..681a5d58d40d 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -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. */