The patch titled Subject: zram: permit reclaim in recompression handle allocation has been added to the -mm mm-unstable branch. Its filename is zram-permit-reclaim-in-recompression-handle-allocation.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/zram-permit-reclaim-in-recompression-handle-allocation.patch This patch will later appear in the mm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: Sergey Senozhatsky <senozhatsky@xxxxxxxxxxxx> Subject: zram: permit reclaim in recompression handle allocation Date: Mon, 27 Jan 2025 16:29:18 +0900 Recompression path can now permit direct reclaim during new zs_handle allocation, because it's not atomic anymore. Link: https://lkml.kernel.org/r/20250127072932.1289973-8-senozhatsky@xxxxxxxxxxxx Signed-off-by: Sergey Senozhatsky <senozhatsky@xxxxxxxxxxxx> Cc: Minchan Kim <minchan@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/block/zram/zram_drv.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) --- a/drivers/block/zram/zram_drv.c~zram-permit-reclaim-in-recompression-handle-allocation +++ a/drivers/block/zram/zram_drv.c @@ -1988,17 +1988,11 @@ static int recompress_slot(struct zram * return 0; /* - * No direct reclaim (slow path) for handle allocation and no - * re-compression attempt (unlike in zram_write_bvec()) since - * we already have stored that object in zsmalloc. If we cannot - * alloc memory for recompressed object then we bail out and - * simply keep the old (existing) object in zsmalloc. + * If we cannot alloc memory for recompressed object then we bail out + * and simply keep the old (existing) object in zsmalloc. */ handle_new = zs_malloc(zram->mem_pool, comp_len_new, - __GFP_KSWAPD_RECLAIM | - __GFP_NOWARN | - __GFP_HIGHMEM | - __GFP_MOVABLE); + GFP_NOIO | __GFP_HIGHMEM | __GFP_MOVABLE); if (IS_ERR_VALUE(handle_new)) { zcomp_stream_put(zram->comps[prio], zstrm); return PTR_ERR((void *)handle_new); _ Patches currently in -mm which might be from senozhatsky@xxxxxxxxxxxx are zram-switch-to-non-atomic-entry-locking.patch zram-do-not-use-per-cpu-compression-streams.patch zram-remove-crypto-include.patch zram-remove-max_comp_streams-device-attr.patch zram-remove-two-staged-handle-allocation.patch zram-permit-reclaim-in-zstd-custom-allocator.patch zram-permit-reclaim-in-recompression-handle-allocation.patch zram-remove-writestall-zram_stats-member.patch zram-unlock-slot-during-recompression.patch