[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YP4PjMnw1OZtARQC@google.com>
Date: Mon, 26 Jul 2021 10:27:40 +0900
From: Sergey Senozhatsky <senozhatsky@...omium.org>
To: Minchan Kim <minchan@...nel.org>,
Huangzhaoyang <huangzhaoyang@...il.com>
Cc: Zhaoyang Huang <zhaoyang.huang@...soc.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, Nitin Gupta <ngupta@...are.org>,
Sergey Senozhatsky <senozhatsky@...omium.org>
Subject: Re: [PATCH] driver: zram: fix wrong counting on pages_store
On (21/07/20 14:47), Huangzhaoyang wrote:
> It makes the statistic confused when counting pages_store in during writeback.
> pages_store should just reflect the swapped pages on ZRAM, while bd_writes be
> responsible for writeback things.
>
> Signed-off-by: Zhaoyang Huang <zhaoyang.huang@...soc.com>
> ---
> drivers/block/zram/zram_drv.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
> index cf8deec..6bdaa9d 100644
> --- a/drivers/block/zram/zram_drv.c
> +++ b/drivers/block/zram/zram_drv.c
> @@ -765,7 +765,6 @@ static ssize_t writeback_store(struct device *dev,
> zram_set_flag(zram, index, ZRAM_WB);
> zram_set_element(zram, index, blk_idx);
> blk_idx = 0;
> - atomic64_inc(&zram->stats.pages_stored);
Yeah, I think we don't need it here.
Minchan, what do you think?
Powered by blists - more mailing lists