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

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

Merge "lowmemorykiller: fix cma accounting"

parents 59c26c36 263316a1
Loading
Loading
Loading
Loading
+7 −18
Original line number Diff line number Diff line
@@ -264,27 +264,16 @@ static DEFINE_MUTEX(scan_mutex);

static int can_use_cma_pages(gfp_t gfp_mask)
{
	int can_use = 0;
	int mtype = gfpflags_to_migratetype(gfp_mask);
	int i = 0;
	int *mtype_fallbacks = get_migratetype_fallbacks(mtype);

	if (is_migrate_cma(mtype)) {
		can_use = 1;
	} else {
		for (i = 0;; i++) {
			int fallbacktype = mtype_fallbacks[i];

			if (is_migrate_cma(fallbacktype)) {
				can_use = 1;
				break;
			}
	/*
	 * Assumes that all types of movable pages can be
	 * served by cma. Fix this if that changes.
	 */
	if (mtype == MIGRATE_MOVABLE)
		return 1;

			if (fallbacktype == MIGRATE_TYPES)
				break;
		}
	}
	return can_use;
	return 0;
}

void tune_lmk_zone_param(struct zonelist *zonelist, int classzone_idx,