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

Commit e1a635a4 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

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

parents b6766e40 ae2a72e9
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
// 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;