* [PATCH] zram: further limit recompression threshold
@ 2023-06-14 14:13 Sergey Senozhatsky
2023-06-14 14:16 ` Brian Geffon
2023-06-14 19:52 ` Andrew Morton
0 siblings, 2 replies; 4+ messages in thread
From: Sergey Senozhatsky @ 2023-06-14 14:13 UTC (permalink / raw)
To: Andrew Morton, Minchan Kim
Cc: Jens Axboe, linux-kernel, linux-block, Sergey Senozhatsky,
Brian Geffon
Recompression threshold should be below huge-size-class
watermark.
Suggested-by: Brian Geffon <bgeffon@google.com>
Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
---
drivers/block/zram/zram_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index 1867f378b319..5676e6dd5b16 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -1753,7 +1753,7 @@ static ssize_t recompress_store(struct device *dev,
}
}
- if (threshold >= PAGE_SIZE)
+ if (threshold >= huge_class_size)
return -EINVAL;
down_read(&zram->init_lock);
--
2.41.0.162.gfafddb0af9-goog
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] zram: further limit recompression threshold
2023-06-14 14:13 [PATCH] zram: further limit recompression threshold Sergey Senozhatsky
@ 2023-06-14 14:16 ` Brian Geffon
2023-06-14 19:52 ` Andrew Morton
1 sibling, 0 replies; 4+ messages in thread
From: Brian Geffon @ 2023-06-14 14:16 UTC (permalink / raw)
To: Sergey Senozhatsky
Cc: Andrew Morton, Minchan Kim, Jens Axboe, linux-kernel, linux-block
Thanks Sergey
On Wed, Jun 14, 2023 at 10:13 AM Sergey Senozhatsky
<senozhatsky@chromium.org> wrote:
>
> Recompression threshold should be below huge-size-class
> watermark.
Acked-by: Brian Geffon <bgeffon@google.com>
>
> Suggested-by: Brian Geffon <bgeffon@google.com>
> Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
> ---
> drivers/block/zram/zram_drv.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
> index 1867f378b319..5676e6dd5b16 100644
> --- a/drivers/block/zram/zram_drv.c
> +++ b/drivers/block/zram/zram_drv.c
> @@ -1753,7 +1753,7 @@ static ssize_t recompress_store(struct device *dev,
> }
> }
>
> - if (threshold >= PAGE_SIZE)
> + if (threshold >= huge_class_size)
> return -EINVAL;
>
> down_read(&zram->init_lock);
> --
> 2.41.0.162.gfafddb0af9-goog
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] zram: further limit recompression threshold
2023-06-14 14:13 [PATCH] zram: further limit recompression threshold Sergey Senozhatsky
2023-06-14 14:16 ` Brian Geffon
@ 2023-06-14 19:52 ` Andrew Morton
2023-06-15 1:30 ` Sergey Senozhatsky
1 sibling, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2023-06-14 19:52 UTC (permalink / raw)
To: Sergey Senozhatsky
Cc: Minchan Kim, Jens Axboe, linux-kernel, linux-block, Brian Geffon
On Wed, 14 Jun 2023 23:13:12 +0900 Sergey Senozhatsky <senozhatsky@chromium.org> wrote:
> Recompression threshold should be below huge-size-class
> watermark.
The changelog explains what the code does, but not why it does it?
> --- a/drivers/block/zram/zram_drv.c
> +++ b/drivers/block/zram/zram_drv.c
> @@ -1753,7 +1753,7 @@ static ssize_t recompress_store(struct device *dev,
> }
> }
>
> - if (threshold >= PAGE_SIZE)
> + if (threshold >= huge_class_size)
> return -EINVAL;
>
> down_read(&zram->init_lock);
> --
> 2.41.0.162.gfafddb0af9-goog
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] zram: further limit recompression threshold
2023-06-14 19:52 ` Andrew Morton
@ 2023-06-15 1:30 ` Sergey Senozhatsky
0 siblings, 0 replies; 4+ messages in thread
From: Sergey Senozhatsky @ 2023-06-15 1:30 UTC (permalink / raw)
To: Andrew Morton
Cc: Sergey Senozhatsky, Minchan Kim, Jens Axboe, linux-kernel,
linux-block, Brian Geffon
On (23/06/14 12:52), Andrew Morton wrote:
> On Wed, 14 Jun 2023 23:13:12 +0900 Sergey Senozhatsky <senozhatsky@chromium.org> wrote:
>
> > Recompression threshold should be below huge-size-class
> > watermark.
>
> The changelog explains what the code does, but not why it does it?
Good point. Let me send out a V2 quickly.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-06-15 1:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-14 14:13 [PATCH] zram: further limit recompression threshold Sergey Senozhatsky
2023-06-14 14:16 ` Brian Geffon
2023-06-14 19:52 ` Andrew Morton
2023-06-15 1:30 ` Sergey Senozhatsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox