Loading drivers/block/zram/zram_drv.c +3 −2 Original line number Diff line number Diff line Loading @@ -1147,13 +1147,14 @@ static int __zram_bvec_write(struct zram *zram, struct bio_vec *bvec, __GFP_KSWAPD_RECLAIM | __GFP_NOWARN | __GFP_HIGHMEM | __GFP_MOVABLE); __GFP_MOVABLE | __GFP_CMA); if (!handle) { zcomp_stream_put(zram->comp); atomic64_inc(&zram->stats.writestall); handle = zs_malloc(zram->mem_pool, comp_len, GFP_NOIO | __GFP_HIGHMEM | __GFP_MOVABLE); __GFP_MOVABLE | __GFP_CMA); if (handle) goto compress_again; return -ENOMEM; Loading mm/cma.c +2 −1 Original line number Diff line number Diff line Loading @@ -467,7 +467,8 @@ struct page *cma_alloc(struct cma *cma, size_t count, unsigned int align, bitmap_maxno, start, bitmap_count, mask, offset); if (bitmap_no >= bitmap_maxno) { if (retry_after_sleep < max_retries) { if ((retry_after_sleep < max_retries) && (ret == -EBUSY)) { start = 0; /* * update max retries if available free regions Loading mm/page_alloc.c +12 −2 Original line number Diff line number Diff line Loading @@ -3246,6 +3246,14 @@ bool __zone_watermark_ok(struct zone *z, unsigned int order, unsigned long mark, continue; for (mt = 0; mt < MIGRATE_PCPTYPES; mt++) { #ifdef CONFIG_CMA /* * Note that this check is needed only * when MIGRATE_CMA < MIGRATE_PCPTYPES. */ if (mt == MIGRATE_CMA) continue; #endif if (!list_empty(&area->free_list[mt])) return true; } Loading Loading @@ -3980,7 +3988,8 @@ gfp_to_alloc_flags(gfp_t gfp_mask) alloc_flags |= ALLOC_HARDER; #ifdef CONFIG_CMA if (gfpflags_to_migratetype(gfp_mask) == MIGRATE_MOVABLE) if ((gfpflags_to_migratetype(gfp_mask) == MIGRATE_MOVABLE) && (gfp_mask & __GFP_CMA)) alloc_flags |= ALLOC_CMA; #endif return alloc_flags; Loading Loading @@ -4440,7 +4449,8 @@ static inline bool prepare_alloc_pages(gfp_t gfp_mask, unsigned int order, if (should_fail_alloc_page(gfp_mask, order)) return false; if (IS_ENABLED(CONFIG_CMA) && ac->migratetype == MIGRATE_MOVABLE) if (IS_ENABLED(CONFIG_CMA) && ac->migratetype == MIGRATE_MOVABLE && (gfp_mask & __GFP_CMA)) *alloc_flags |= ALLOC_CMA; return true; Loading mm/zsmalloc.c +2 −2 Original line number Diff line number Diff line Loading @@ -345,7 +345,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) Loading @@ -356,7 +356,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) Loading Loading
drivers/block/zram/zram_drv.c +3 −2 Original line number Diff line number Diff line Loading @@ -1147,13 +1147,14 @@ static int __zram_bvec_write(struct zram *zram, struct bio_vec *bvec, __GFP_KSWAPD_RECLAIM | __GFP_NOWARN | __GFP_HIGHMEM | __GFP_MOVABLE); __GFP_MOVABLE | __GFP_CMA); if (!handle) { zcomp_stream_put(zram->comp); atomic64_inc(&zram->stats.writestall); handle = zs_malloc(zram->mem_pool, comp_len, GFP_NOIO | __GFP_HIGHMEM | __GFP_MOVABLE); __GFP_MOVABLE | __GFP_CMA); if (handle) goto compress_again; return -ENOMEM; Loading
mm/cma.c +2 −1 Original line number Diff line number Diff line Loading @@ -467,7 +467,8 @@ struct page *cma_alloc(struct cma *cma, size_t count, unsigned int align, bitmap_maxno, start, bitmap_count, mask, offset); if (bitmap_no >= bitmap_maxno) { if (retry_after_sleep < max_retries) { if ((retry_after_sleep < max_retries) && (ret == -EBUSY)) { start = 0; /* * update max retries if available free regions Loading
mm/page_alloc.c +12 −2 Original line number Diff line number Diff line Loading @@ -3246,6 +3246,14 @@ bool __zone_watermark_ok(struct zone *z, unsigned int order, unsigned long mark, continue; for (mt = 0; mt < MIGRATE_PCPTYPES; mt++) { #ifdef CONFIG_CMA /* * Note that this check is needed only * when MIGRATE_CMA < MIGRATE_PCPTYPES. */ if (mt == MIGRATE_CMA) continue; #endif if (!list_empty(&area->free_list[mt])) return true; } Loading Loading @@ -3980,7 +3988,8 @@ gfp_to_alloc_flags(gfp_t gfp_mask) alloc_flags |= ALLOC_HARDER; #ifdef CONFIG_CMA if (gfpflags_to_migratetype(gfp_mask) == MIGRATE_MOVABLE) if ((gfpflags_to_migratetype(gfp_mask) == MIGRATE_MOVABLE) && (gfp_mask & __GFP_CMA)) alloc_flags |= ALLOC_CMA; #endif return alloc_flags; Loading Loading @@ -4440,7 +4449,8 @@ static inline bool prepare_alloc_pages(gfp_t gfp_mask, unsigned int order, if (should_fail_alloc_page(gfp_mask, order)) return false; if (IS_ENABLED(CONFIG_CMA) && ac->migratetype == MIGRATE_MOVABLE) if (IS_ENABLED(CONFIG_CMA) && ac->migratetype == MIGRATE_MOVABLE && (gfp_mask & __GFP_CMA)) *alloc_flags |= ALLOC_CMA; return true; Loading
mm/zsmalloc.c +2 −2 Original line number Diff line number Diff line Loading @@ -345,7 +345,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) Loading @@ -356,7 +356,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) Loading