From: sun k <sunk67188@gmail.com>
To: David Hildenbrand <david@redhat.com>
Cc: yosry.ahmed@linux.dev, Johannes Weiner <hannes@cmpxchg.org>,
Nhat Pham <nphamcs@gmail.com>,
Chengming Zhou <chengming.zhou@linux.dev>,
Andrew Morton <akpm@linux-foundation.org>,
Kanchana P Sridhar <kanchana.p.sridhar@intel.com>,
"open list:ZSWAP COMPRESSED SWAP CACHING" <linux-mm@kvack.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mm: zswap: use ATOMIC_LONG_INIT to initialize zswap_stored_pages
Date: Wed, 26 Feb 2025 23:41:00 +0800 [thread overview]
Message-ID: <CAAuSuOos1ofe3modw_8W0_X8rzka0fWTS+tWi5HVSY1cx1j9mw@mail.gmail.com> (raw)
In-Reply-To: <2a4d6ef6-d7e5-46b9-a4ed-b7aad7a1c20d@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1777 bytes --]
Very helpful! Thanks for the tips!
On Wed, Feb 26, 2025, 11:39 PM David Hildenbrand <david@redhat.com> wrote:
> On 26.02.25 16:32, Sun YangKai wrote:
>
> Something for the future: if you send a v2, indicate that in the patch
> subject ("[PATCH v2]") and ideally, describe the change since v1 under
> the "---", and don't send it as reply to the original patch.
>
>
> > 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`
> >
> > This was introduced in 6e1fa555ec77, in which we modified
>
> the correct way to reference to commits ids even in text is the format
> you use below.
>
> But here it's sufficient to not be repetitive and simply say
>
> "We changed the type of zswap_stored_pages to be an atomic_long_t, but
> didn't change the initialization."
>
> Acked-by: David Hildenbrand <david@redhat.com>
>
> > the type of zswap_stored_pages to atomic_long_t,
> > but didn't change the initialization.
> >
> > Fixes: 6e1fa555ec77 ("mm: zswap: modify zswap_stored_pages to be
> atomic_long_t")
> > Signed-off-by: Sun YangKai <sunk67188@gmail.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);
> >
> > /*
> > * The statistics below are not protected from concurrent access for
>
>
> --
> Cheers,
>
> David / dhildenb
>
>
[-- Attachment #2: Type: text/html, Size: 2517 bytes --]
prev parent reply other threads:[~2025-02-26 15:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-26 12:41 Sun YangKai
2025-02-26 15:15 ` Yosry Ahmed
2025-02-26 15:32 ` Sun YangKai
2025-02-26 15:39 ` David Hildenbrand
2025-02-26 15:41 ` sun k [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAAuSuOos1ofe3modw_8W0_X8rzka0fWTS+tWi5HVSY1cx1j9mw@mail.gmail.com \
--to=sunk67188@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=chengming.zhou@linux.dev \
--cc=david@redhat.com \
--cc=hannes@cmpxchg.org \
--cc=kanchana.p.sridhar@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nphamcs@gmail.com \
--cc=yosry.ahmed@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox