]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] cpuset: mark number_of_cpusets read_mostly
authorPaul Jackson <pj@sgi.com>
Sun, 8 Jan 2006 09:02:03 +0000 (01:02 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 9 Jan 2006 04:13:45 +0000 (20:13 -0800)
commitc79ae8b946a92f99e11c7900e0f392a9c3f09f78
treecc0f07bc07156c6f805a72c39ae2d5655a97fede
parent9fd57d69c4e2fcd63a16514ded8d6c6d86c98084
[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>
kernel/cpuset.c