[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250811212423.5667183e69c373c1daf95ecc@linux-foundation.org>
Date: Mon, 11 Aug 2025 21:24:23 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Kairui Song <ryncsn@...il.com>
Cc: Chris Li <chrisl@...nel.org>, Kemeng Shi <shikemeng@...weicloud.com>,
Nhat Pham <nphamcs@...il.com>, Baoquan He <bhe@...hat.com>, Barry Song
<baohua@...nel.org>, "Huang, Ying" <ying.huang@...ux.alibaba.com>,
linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] mm/swapfile.c: introduce function
alloc_swap_scan_list()
On Sat, 9 Aug 2025 03:51:48 +0800 Kairui Song <ryncsn@...il.com> wrote:
> On Fri, Aug 8, 2025 at 3:48 PM Chris Li <chrisl@...nel.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.
Powered by blists - more mailing lists