The patch titled Subject: Re: zram: Introduce recompress sysfs knob has been added to the -mm mm-unstable branch. Its filename is zram-introduce-recompress-sysfs-knob-fix.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/zram-introduce-recompress-sysfs-knob-fix.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: Re: zram: Introduce recompress sysfs knob Date: Tue, 18 Oct 2022 11:42:39 +0900 A fixup patch: update Kconfig description and tweak coding styles. Link: https://lkml.kernel.org/r/Y04Sn50kt5qLxpbK@xxxxxxxxxx Signed-off-by: Sergey Senozhatsky <senozhatsky@xxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/block/zram/Kconfig | 3 +++ drivers/block/zram/zram_drv.c | 7 ++----- 2 files changed, 5 insertions(+), 5 deletions(-) --- a/drivers/block/zram/Kconfig~zram-introduce-recompress-sysfs-knob-fix +++ a/drivers/block/zram/Kconfig @@ -90,3 +90,6 @@ config ZRAM_MULTI_COMP echo TIMEOUT > /sys/block/zramX/idle echo SIZE > /sys/block/zramX/recompress + + SIZE (in bytes) parameter sets the object size watermark: idle + objects that are of a smaller size will not get recompressed. --- a/drivers/block/zram/zram_drv.c~zram-introduce-recompress-sysfs-knob-fix +++ a/drivers/block/zram/zram_drv.c @@ -1623,9 +1623,7 @@ out: * * Corresponding ZRAM slot should be locked. */ -static int zram_recompress(struct zram *zram, - u32 index, - struct page *page, +static int zram_recompress(struct zram *zram, u32 index, struct page *page, int size_watermark) { unsigned long handle_prev; @@ -1708,8 +1706,7 @@ static int zram_recompress(struct zram * static ssize_t recompress_store(struct device *dev, struct device_attribute *attr, - const char *buf, - size_t len) + const char *buf, size_t len) { struct zram *zram = dev_to_zram(dev); unsigned long nr_pages = zram->disksize >> PAGE_SHIFT; _ Patches currently in -mm which might be from senozhatsky@xxxxxxxxxxxx are zram-preparation-for-multi-zcomp-support.patch zram-add-recompression-algorithm-sysfs-knob.patch zram-factor-out-wb-and-non-wb-zram-read-functions.patch zram-introduce-recompress-sysfs-knob.patch zram-introduce-recompress-sysfs-knob-fix.patch documentation-add-recompression-documentation.patch zram-add-recompression-algorithm-choice-to-kconfig.patch zram-add-recompress-flag-to-read_block_state.patch zram-correct-typos.patch