diff options
author | Anton Blanchard <anton@samba.org> | 2011-05-11 17:25:14 +1000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-05-11 15:19:27 -0700 |
commit | 5409d2cd841cf2c76396470e566500f6505f8d2a (patch) | |
tree | ba91b4eb9d982461b45cf810380b53a2a9916408 /sound/soc/s6000 | |
parent | 1f8e1cdac616e510eeb2dc2a9226bf597bc6cfd6 (diff) | |
download | linux-5409d2cd841cf2c76396470e566500f6505f8d2a.tar.gz linux-5409d2cd841cf2c76396470e566500f6505f8d2a.tar.bz2 linux-5409d2cd841cf2c76396470e566500f6505f8d2a.zip |
memory hotplug: Speed up add/remove when blocks are larger than PAGES_PER_SECTION
On ppc64 the minimum memory section for hotplug is 16MB but most
recent machines have a memory block size of 256MB. This means
memory_block_change_state does 16 separate calls to
memory_section_action.
This also means we call the notifiers 16 times and the hook
in the ehea network driver is quite costly. To offline one 256MB
region takes:
# time echo offline > /sys/devices/system/memory/memory32/state
7.9s
This patch removes the loop and calls online_pages or
remove_memory once for the entire region and in doing so makes
the logic simpler since we don't have to back out if things fail
part way through.
The same test to offline one region now takes:
# time echo online > /sys/devices/system/memory/memory32/state
0.67s
Over 11 times faster.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'sound/soc/s6000')
0 files changed, 0 insertions, 0 deletions