lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAF8kJuP=WfkPSSNs-7RS=1D+3LkKrMU=84o9mhOb6wTPSRNUqQ@mail.gmail.com>
Date: Mon, 11 Aug 2025 21:47:41 -0700
From: Chris Li <chrisl@...nel.org>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Kairui Song <ryncsn@...il.com>, 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 Mon, Aug 11, 2025 at 9:24 PM Andrew Morton <akpm@...ux-foundation.org> wrote:
>
> 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.

Ack. My bad.

>
> 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.
>
Thanks I will do a V3 and use something like that. I spot some other
minor cleanup required. Might just add it to the clean up series.

Chris

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ