[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240201175536.GD321148@cmpxchg.org>
Date: Thu, 1 Feb 2024 12:55:36 -0500
From: Johannes Weiner <hannes@...xchg.org>
To: Chengming Zhou <zhouchengming@...edance.com>
Cc: Nhat Pham <nphamcs@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Yosry Ahmed <yosryahmed@...gle.com>, linux-kernel@...r.kernel.org,
linux-mm@...ck.org
Subject: Re: [PATCH 4/6] mm/zswap: remove duplicate_entry debug value
On Thu, Feb 01, 2024 at 03:49:04PM +0000, Chengming Zhou wrote:
> cat /sys/kernel/debug/zswap/duplicate_entry
> 2086447
>
> When testing, the duplicate_entry value is very high, but no warning
> message in the kernel log. From the comment of duplicate_entry
> "Duplicate store was encountered (rare)", it seems something goes wrong.
>
> Actually it's incremented in the beginning of zswap_store(), which found
> its zswap entry has already on the tree. And this is a normal case,
> since the folio could leave zswap entry on the tree after swapin,
> later it's dirtied and swapout/zswap_store again, found its original
> zswap entry. (Maybe we can reuse it instead of invalidating it?)
Probably not worth it, especially after the next patch.
> So duplicate_entry should be only incremented in the real bug case,
> which already have "WARN_ON(1)", it looks redundant to count bug case,
> so this patch just remove it.
>
> Signed-off-by: Chengming Zhou <zhouchengming@...edance.com>
Either way, I agree that the WARN_ON() is more useful to point out a
bug than a counter.
Acked-by: Johannes Weiner <hannes@...xchg.org>
Powered by blists - more mailing lists