Merge "soc: qcom: mem-offline: isolate freepages in pageblock boundaries"

This commit is contained in:
qctecmdr 2021-01-21 04:59:13 -08:00 • committed by Gerrit - the friendly Code Review server
commit e1a635a475

View file

@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
* Copyright (c) 2018-2021, The Linux Foundation. All rights reserved.
*/
#include <linux/memory.h>
@ -483,8 +483,9 @@ static void isolate_free_pages(struct movable_zone_fill_control *fc)
* returning once we have SWAP_CLUSTER_MAX pages in the
* free list for migration.
*/
if (fc->nr_free_pages >= SWAP_CLUSTER_MAX ||
has_pend_offline_req)
if (!((start_pfn + 1) % pageblock_nr_pages) &&
(fc->nr_free_pages >= SWAP_CLUSTER_MAX ||
has_pend_offline_req))
break;
}
fc->start_pfn = start_pfn + 1;