The patch titled Subject: zram: show zsmalloc objs_moved stat in mm_stat has been added to the -mm mm-unstable branch. Its filename is zram-show-zsmalloc-objs_moved-stat-in-mm_stat.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/zram-show-zsmalloc-objs_moved-stat-in-mm_stat.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: show zsmalloc objs_moved stat in mm_stat Date: Thu, 23 Feb 2023 12:04:51 +0900 Extend zram mm_show with new objs_moved zs_pool_stats. Link: https://lkml.kernel.org/r/20230223030451.543162-7-senozhatsky@xxxxxxxxxxxx Signed-off-by: Sergey Senozhatsky <senozhatsky@xxxxxxxxxxxx> Cc: Minchan Kim <minchan@xxxxxxxxxx> Cc: Yosry Ahmed <yosryahmed@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- Documentation/admin-guide/blockdev/zram.rst | 1 + drivers/block/zram/zram_drv.c | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) --- a/Documentation/admin-guide/blockdev/zram.rst~zram-show-zsmalloc-objs_moved-stat-in-mm_stat +++ a/Documentation/admin-guide/blockdev/zram.rst @@ -267,6 +267,7 @@ line of text and contains the following pages_compacted the number of pages freed during compaction huge_pages the number of incompressible pages huge_pages_since the number of incompressible pages since zram set up + objs_moved The number of objects moved during pool compaction ================ ============================================================= File /sys/block/zram<id>/bd_stat --- a/drivers/block/zram/zram_drv.c~zram-show-zsmalloc-objs_moved-stat-in-mm_stat +++ a/drivers/block/zram/zram_drv.c @@ -1223,7 +1223,7 @@ static ssize_t mm_stat_show(struct devic max_used = atomic_long_read(&zram->stats.max_used_pages); ret = scnprintf(buf, PAGE_SIZE, - "%8llu %8llu %8llu %8lu %8ld %8llu %8lu %8llu %8llu\n", + "%8llu %8llu %8llu %8lu %8ld %8llu %8lu %8llu %8llu %8llu\n", orig_size << PAGE_SHIFT, (u64)atomic64_read(&zram->stats.compr_data_size), mem_used << PAGE_SHIFT, @@ -1232,7 +1232,8 @@ static ssize_t mm_stat_show(struct devic (u64)atomic64_read(&zram->stats.same_pages), atomic_long_read(&pool_stats.pages_compacted), (u64)atomic64_read(&zram->stats.huge_pages), - (u64)atomic64_read(&zram->stats.huge_pages_since)); + (u64)atomic64_read(&zram->stats.huge_pages_since), + (u64)atomic64_read(&pool_stats.objs_moved)); up_read(&zram->init_lock); return ret; _ Patches currently in -mm which might be from senozhatsky@xxxxxxxxxxxx are zsmalloc-remove-insert_zspage-inuse-optimization.patch zsmalloc-remove-stat-and-fullness-enums.patch zsmalloc-fine-grained-inuse-ratio-based-fullness-grouping.patch zsmalloc-rework-compaction-algorithm.patch zsmalloc-extend-compaction-statistics.patch zram-show-zsmalloc-objs_moved-stat-in-mm_stat.patch