* [PATCH] zram: remove unused stats fields
@ 2022-11-17 14:13 Sergey Senozhatsky
2022-11-17 21:11 ` Minchan Kim
0 siblings, 1 reply; 2+ messages in thread
From: Sergey Senozhatsky @ 2022-11-17 14:13 UTC (permalink / raw)
To: Minchan Kim, Andrew Morton; +Cc: Nitin Gupta, linux-kernel, Sergey Senozhatsky
We don't show num_reads and num_writes since we removed
corresponding sysfs nodes in 2017. Block layer stats are
exposed via /sys/block/zramX/stat file.
However, we still increment those atomic vars and store
them in zram stats. Remove leftovers.
Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
---
drivers/block/zram/zram_drv.c | 2 --
drivers/block/zram/zram_drv.h | 2 --
2 files changed, 4 deletions(-)
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index 4e493c198d84..eea06b1a556f 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -2033,11 +2033,9 @@ static int zram_bvec_rw(struct zram *zram, struct bio_vec *bvec, u32 index,
int ret;
if (!op_is_write(op)) {
- atomic64_inc(&zram->stats.num_reads);
ret = zram_bvec_read(zram, bvec, index, offset, bio);
flush_dcache_page(bvec->bv_page);
} else {
- atomic64_inc(&zram->stats.num_writes);
ret = zram_bvec_write(zram, bvec, index, offset, bio);
}
diff --git a/drivers/block/zram/zram_drv.h b/drivers/block/zram/zram_drv.h
index c322d9c9dde2..4b46fcc651b1 100644
--- a/drivers/block/zram/zram_drv.h
+++ b/drivers/block/zram/zram_drv.h
@@ -76,8 +76,6 @@ struct zram_table_entry {
struct zram_stats {
atomic64_t compr_data_size; /* compressed size of pages stored */
- atomic64_t num_reads; /* failed + successful */
- atomic64_t num_writes; /* --do-- */
atomic64_t failed_reads; /* can happen when memory is too low */
atomic64_t failed_writes; /* can happen when memory is too low */
atomic64_t invalid_io; /* non-page-aligned I/O requests */
--
2.38.1.431.g37b22c650d-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] zram: remove unused stats fields
2022-11-17 14:13 [PATCH] zram: remove unused stats fields Sergey Senozhatsky
@ 2022-11-17 21:11 ` Minchan Kim
0 siblings, 0 replies; 2+ messages in thread
From: Minchan Kim @ 2022-11-17 21:11 UTC (permalink / raw)
To: Sergey Senozhatsky; +Cc: Andrew Morton, Nitin Gupta, linux-kernel
On Thu, Nov 17, 2022 at 11:13:26PM +0900, Sergey Senozhatsky wrote:
> We don't show num_reads and num_writes since we removed
> corresponding sysfs nodes in 2017. Block layer stats are
> exposed via /sys/block/zramX/stat file.
>
> However, we still increment those atomic vars and store
> them in zram stats. Remove leftovers.
>
> Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Acked-by: Minchan Kim <minchan@kernel.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-11-17 21:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-17 14:13 [PATCH] zram: remove unused stats fields Sergey Senozhatsky
2022-11-17 21:11 ` Minchan Kim
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.