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

Commit b21c7a67 authored by Liam Mark's avatar Liam Mark
Browse files

Revert "lowmemorykiller: fix cma accounting"



This reverts commit 263316a1 ("lowmemorykiller: fix cma accounting")
Re-introducing __GFP_CMA so revert this change and correct the logic to
simply check for MIGRATE_MOVABLE and __GFP_CMA.

Change-Id: Ifae86190f6db38de973c31958afac7ac7845ee73
Signed-off-by: default avatarLiam Mark <lmark@codeaurora.org>
parent e1f0edb1
Loading
Loading
Loading
Loading
+2 −7
Original line number Diff line number Diff line
@@ -264,13 +264,8 @@ static DEFINE_MUTEX(scan_mutex);

static int can_use_cma_pages(gfp_t gfp_mask)
{
	int mtype = gfpflags_to_migratetype(gfp_mask);

	/*
	 * Assumes that all types of movable pages can be
	 * served by cma. Fix this if that changes.
	 */
	if (mtype == MIGRATE_MOVABLE)
	if (gfpflags_to_migratetype(gfp_mask) == MIGRATE_MOVABLE &&
	    (gfp_mask & __GFP_CMA))
		return 1;

	return 0;
+0 −7
Original line number Diff line number Diff line
@@ -66,13 +66,6 @@ enum migratetype {

/* In mm/page_alloc.c; keep in sync also with show_migration_types() there */
extern char * const migratetype_names[MIGRATE_TYPES];
/*
 * Returns a list which contains the migrate types on to which
 * an allocation falls back when the free list for the migrate
 * type mtype is depleted.
 * The end of the list is delimited by the type MIGRATE_TYPES.
 */
extern int *get_migratetype_fallbacks(int mtype);

#ifdef CONFIG_CMA
#  define is_migrate_cma(migratetype) unlikely((migratetype) == MIGRATE_CMA)
+0 −5
Original line number Diff line number Diff line
@@ -1855,11 +1855,6 @@ static int fallbacks[MIGRATE_TYPES][4] = {
#endif
};

int *get_migratetype_fallbacks(int mtype)
{
	return fallbacks[mtype];
}

#ifdef CONFIG_CMA
static struct page *__rmqueue_cma_fallback(struct zone *zone,
					unsigned int order)