Files
android_kernel_xiaomi_sm8450/mm/memory_hotplug.c
Sudarshan Rajagopalan bbea47ac00 ANDROID: mm/memory_hotplug: fix check for proper subsection removal
When removing memory subsections, we need to ensure that subsections are
not in use or online before we try to remove them. Previously, we used
test_pages_isolated() which works only if pages were onlined and added to
a zone before. However, we should allow subsection addition and removal
without them being added to buddy i.e. onlined. test_pages_isolated() would
not help in such cases. Instead, check for valid offlined sections before
the subsections within can be allowed to be removed.

Bug: 170460867
Fixes: 417ac617ea ("ANDROID: mm/memory_hotplug: implement {add/remove}_memory_subsection")
Change-Id: I09b46582cd21e9e5370ebd5434209530edb89e58
Signed-off-by: Sudarshan Rajagopalan <sudaraja@codeaurora.org>
2021-02-09 01:18:45 +00:00

51 KiB