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

Commit 6292c3ed authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "zram: allow zram to allocate CMA pages"

parents c1a89dd7 fda5cc75
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -755,7 +755,8 @@ static int zram_bvec_write(struct zram *zram, struct bio_vec *bvec, u32 index,
				__GFP_KSWAPD_RECLAIM |
				__GFP_NOWARN |
				__GFP_HIGHMEM |
				__GFP_MOVABLE);
				__GFP_MOVABLE |
				__GFP_CMA);
	if (!handle) {
		zcomp_stream_put(zram->comp);
		zstrm = NULL;
@@ -764,7 +765,7 @@ static int zram_bvec_write(struct zram *zram, struct bio_vec *bvec, u32 index,

		handle = zs_malloc(meta->mem_pool, clen,
				GFP_NOIO | __GFP_HIGHMEM |
				__GFP_MOVABLE);
				__GFP_MOVABLE | __GFP_CMA);
		if (handle)
			goto compress_again;

+2 −2
Original line number Diff line number Diff line
@@ -352,7 +352,7 @@ static void destroy_cache(struct zs_pool *pool)
static unsigned long cache_alloc_handle(struct zs_pool *pool, gfp_t gfp)
{
	return (unsigned long)kmem_cache_alloc(pool->handle_cachep,
			gfp & ~(__GFP_HIGHMEM|__GFP_MOVABLE));
			gfp & ~(__GFP_HIGHMEM|__GFP_MOVABLE|__GFP_CMA));
}

static void cache_free_handle(struct zs_pool *pool, unsigned long handle)
@@ -363,7 +363,7 @@ static void cache_free_handle(struct zs_pool *pool, unsigned long handle)
static struct zspage *cache_alloc_zspage(struct zs_pool *pool, gfp_t flags)
{
	return kmem_cache_alloc(pool->zspage_cachep,
			flags & ~(__GFP_HIGHMEM|__GFP_MOVABLE));
			flags & ~(__GFP_HIGHMEM|__GFP_MOVABLE|__GFP_CMA));
};

static void cache_free_zspage(struct zs_pool *pool, struct zspage *zspage)