From: Andrew Morton <akpm@linux-foundation.org>
To: Kairui Song <ryncsn@gmail.com>
Cc: Chris Li <chrisl@kernel.org>,
Kemeng Shi <shikemeng@huaweicloud.com>,
Nhat Pham <nphamcs@gmail.com>, Baoquan He <bhe@redhat.com>,
Barry Song <baohua@kernel.org>,
"Huang, Ying" <ying.huang@linux.alibaba.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] mm/swapfile.c: introduce function alloc_swap_scan_list()
Date: Mon, 11 Aug 2025 21:24:23 -0700 [thread overview]
Message-ID: <20250811212423.5667183e69c373c1daf95ecc@linux-foundation.org> (raw)
In-Reply-To: <CAMgjq7DnniGUdpQQA0YF+LuMuL9+FCLQJP2Q04G_Hsd1sztv9A@mail.gmail.com>
On Sat, 9 Aug 2025 03:51:48 +0800 Kairui Song <ryncsn@gmail.com> wrote:
> On Fri, Aug 8, 2025 at 3:48 PM Chris Li <chrisl@kernel.org> wrote:
> >
> > This the alloc_swap_scan_list() will scan the whole list or the first
> > cluster.
>
> Hi Chris,
>
> This sentence reads strange to me, but English is not my native
> language so I'm not very sure about it.
Yes, I rewrote this to
: alloc_swap_scan_list() will scan the whole list or the first cluster.
:
: This reduces the repeat patterns of isolating a cluster then scanning that
: cluster. As a result, cluster_alloc_swap_entry() is shorter and
: shallower.
:
: No functional change.
Which is hopefully accurate.
LLMs do an awesome job of doing this, although one should carefully
review the output. Here's gemini.google.com:
: alloc_swap_scan_list() now scans either the entire list or just the
: first cluster. This change eliminates the repetitive pattern of
: isolating and then scanning a cluster. As a result, the function
: cluster_alloc_swap_entry() is now shorter and less complex. There are
: no functional changes to the code's behavior.
next prev parent reply other threads:[~2025-08-12 4:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-08 7:48 Chris Li
2025-08-08 19:51 ` Kairui Song
2025-08-12 4:24 ` Andrew Morton [this message]
2025-08-12 4:47 ` Chris Li
2025-08-12 5:58 ` Chris Li
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=20250811212423.5667183e69c373c1daf95ecc@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=baohua@kernel.org \
--cc=bhe@redhat.com \
--cc=chrisl@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nphamcs@gmail.com \
--cc=ryncsn@gmail.com \
--cc=shikemeng@huaweicloud.com \
--cc=ying.huang@linux.alibaba.com \
/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
all inboxes | Powered by JetHome®