Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 8873011c authored by Isaac J. Manjarres's avatar Isaac J. Manjarres
Browse files

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: default avatarIsaac J. Manjarres <isaacm@codeaurora.org>
parent 82202b6f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment