mm/memory_hotplug: Fix try_online_one_block() logic
The logic to walk through the memory blocks in the movable
zone is not correct. When memory at either extreme of the movable
zone is offlined, the start of the movable zone is adjusted such that
it no longer accounts for the block that was offlined--if the block
is at the beginning of the movable zone--or the span of the movable
zone is adjusted such that it no longer covers the block that was
offlined--if the block is at the end of the movable zone. Similarly,
when the entire zone is offlined, the zone's start pfn and span are
set to 0. So, when looking for a block to online, we end up ignoring
some of the blocks at the extremes of the movable zone, or the entire
zone.
Thus, walk through all of the present memory blocks in the system when
deciding to online a block.
Change-Id: I1e1def049f672a1710c5916dfd7de70d3ef68e71
Signed-off-by:
Isaac J. Manjarres <isaacm@codeaurora.org>
Loading
Please register or sign in to comment