mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 13:49:24 -04:00
mem-offline: disallow page migration to isolated page blocks
The isolated page blocks shouldn't be used as migration destination. Consider the below scenario: Pa Pb __offline_pages() isolate the page blocks migrate the page to the isolated page block offline the memory block online the same memory block which clears the page refcount and try to put the page to buddy In the above scenario, Pa is migrating the page to the page block on what Pb is trying to offline after the page block is isolated. This can cause the issues like wrong page contents, memory offline failures. Change-Id: Ibceaa17ed34e4c7f38d555bc82189d7eb212cfcc Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
This commit is contained in:
parent
fa889c3aae
commit
ff56a97530
1 changed files with 7 additions and 0 deletions
|
|
@ -22,6 +22,7 @@
|
|||
#include <linux/vmstat.h>
|
||||
#include <linux/mailbox_client.h>
|
||||
#include <linux/mailbox/qmp.h>
|
||||
#include <linux/page-isolation.h>
|
||||
#include <asm/tlbflush.h>
|
||||
#include <asm/cacheflush.h>
|
||||
#include <soc/qcom/rpm-smd.h>
|
||||
|
|
@ -460,6 +461,12 @@ static void isolate_free_pages(struct movable_zone_fill_control *fc)
|
|||
continue;
|
||||
}
|
||||
|
||||
if (!(start_pfn % pageblock_nr_pages) &&
|
||||
is_migrate_isolate_page(page)) {
|
||||
start_pfn += pageblock_nr_pages - 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!PageBuddy(page))
|
||||
continue;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue