[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240904132508.2000743-2-senozhatsky@chromium.org>
Date: Wed, 4 Sep 2024 22:24:53 +0900
From: Sergey Senozhatsky <senozhatsky@...omium.org>
To: Minchan Kim <minchan@...nel.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Richard Chang <richardycc@...gle.com>,
linux-kernel@...r.kernel.org,
Sergey Senozhatsky <senozhatsky@...omium.org>
Subject: [RFC PATCH 1/3] zram: introduce ZRAM_PP_SLOT flag
This flag will indicate that the slot was selected as
a candidate slot for post-processing (pp) and was assigned
to a pp group.
Signed-off-by: Sergey Senozhatsky <senozhatsky@...omium.org>
---
drivers/block/zram/zram_drv.c | 3 +++
drivers/block/zram/zram_drv.h | 1 +
2 files changed, 4 insertions(+)
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index 1f1bf175a6c3..c91fdf399d1b 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -1368,6 +1368,9 @@ static void zram_free_page(struct zram *zram, size_t index)
goto out;
}
+ if (zram_test_flag(zram, index, ZRAM_PP_SLOT))
+ zram_clear_flag(zram, index, ZRAM_PP_SLOT);
+
handle = zram_get_handle(zram, index);
if (!handle)
return;
diff --git a/drivers/block/zram/zram_drv.h b/drivers/block/zram/zram_drv.h
index b976824ead67..e0578b3542ce 100644
--- a/drivers/block/zram/zram_drv.h
+++ b/drivers/block/zram/zram_drv.h
@@ -50,6 +50,7 @@ enum zram_pageflags {
ZRAM_SAME, /* Page consists the same element */
ZRAM_WB, /* page is stored on backing_device */
ZRAM_UNDER_WB, /* page is under writeback */
+ ZRAM_PP_SLOT, /* Selected for post-processing */
ZRAM_HUGE, /* Incompressible page */
ZRAM_IDLE, /* not accessed page since last idle marking */
ZRAM_INCOMPRESSIBLE, /* none of the algorithms could compress it */
--
2.46.0.469.g59c65b2a67-goog
Powered by blists - more mailing lists