[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAKEwX=OHN-U1L6CnZhWhpnBG3rLy-OBCZ+1rYATR6PXY6hQNHA@mail.gmail.com>
Date: Wed, 26 Feb 2025 00:20:29 -0800
From: Nhat Pham <nphamcs@...il.com>
To: Sun YangKai <sunk67188@...il.com>
Cc: Johannes Weiner <hannes@...xchg.org>, Yosry Ahmed <yosry.ahmed@...ux.dev>,
Chengming Zhou <chengming.zhou@...ux.dev>, Andrew Morton <akpm@...ux-foundation.org>,
"open list:ZSWAP COMPRESSED SWAP CACHING" <linux-mm@...ck.org>, open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] [fix] mm: zswap: use ATOMIC_LONG_INIT to initialize zswap_stored_pages
On Wed, Feb 26, 2025 at 12:04 AM Sun YangKai <sunk67188@...il.com> wrote:
>
> This is currently the only atomic_long_t variable initialized by
> ATOMIC_INIT macro found in the kernel by using
> `grep -r atomic_long_t | grep ATOMIC_INIT`
>
nit: patch description seems non-descriptive. Perhaps you can add some
context - when was this issue first introduced into our codebase?
Also, I think you'll need a fix tag:
Fixes: 6e1fa55 ("mm: zswap: modify zswap_stored_pages to be atomic_long_t")
since the atomic_long_t type was introduced by that patch.
> Signed-off-by: Sun YangKai <sunk67188@...il.com>
> ---
> mm/zswap.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/zswap.c b/mm/zswap.c
> index ac9d299e7d0c..23365e76a3ce 100644
> --- a/mm/zswap.c
> +++ b/mm/zswap.c
> @@ -43,7 +43,7 @@
> * statistics
> **********************************/
> /* The number of compressed pages currently stored in zswap */
> -atomic_long_t zswap_stored_pages = ATOMIC_INIT(0);
> +atomic_long_t zswap_stored_pages = ATOMIC_LONG_INIT(0);
Code itself LGTM FWIW :)
Powered by blists - more mailing lists