summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@hp.com>2005-01-03 04:16:59 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-01-03 04:16:59 -0800
commitd841f01f2354d63fea302c7baf78b2d9eca96a96 (patch)
tree7756c8520354909ad867039b82776c732dafc0b0 /include/linux
parentd32d6f8ab2ef776261359b78127fd0251a041a90 (diff)
[PATCH] collect page_states only from online cpus
I noticed the function __read_page_state() curiously high in a q-tools profile of a write to a software raid0 device. Seems this is because we're checking page_states for all possible cpus and we have NR_CPUS possible when CONFIG_HOTPLUG_CPU=y. The default config for ia64 is now NR_CPUS=512, so on a little 8-way box, this is a significant waste of time. The patch below updates __read_page_state() and __get_page_state() to only count page_state info for online cpus. To keep the stats consistent, the page_alloc notifier is updated to move page_states off of the cpu going offline. On my profile, this dropped __read_page_state() back into the noise and boosted block write performance by 5% (as measured by spew - http://spew.berlios.de). Signed-off-by: Alex Williamson <alex.williamson@hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions