[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y04Sn50kt5qLxpbK@google.com>
Date: Tue, 18 Oct 2022 11:42:39 +0900
From: Sergey Senozhatsky <senozhatsky@...omium.org>
To: Andrew Morton <akpm@...ux-foundation.org>,
Minchan Kim <minchan@...nel.org>
Cc: Sergey Senozhatsky <senozhatsky@...omium.org>,
Nitin Gupta <ngupta@...are.org>, linux-kernel@...r.kernel.org,
linux-mm@...ck.org
Subject: Re: [PATCHv3 4/8] zram: Introduce recompress sysfs knob
A fixup patch: update Kconfig description and tweak coding styles.
---
diff --git a/drivers/block/zram/Kconfig b/drivers/block/zram/Kconfig
index 7febf36e93eb..3e00656a6f8a 100644
--- a/drivers/block/zram/Kconfig
+++ b/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.
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index 12368e773f3d..143c33bd6783 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -1623,9 +1623,7 @@ static int zram_bvec_write(struct zram *zram, struct bio_vec *bvec,
*
* 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 *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;
Powered by blists - more mailing lists