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: <CAJj2-QGgHSdzq5DqSi5M+XGeKWRD8aeH_C-OptyCDeV9CEHkBA@mail.gmail.com>
Date: Wed, 2 Jul 2025 12:22:28 -0700
From: Yuanchu Xie <yuanchu@...gle.com>
To: Hao Jia <jiahao.kernel@...il.com>
Cc: akpm@...ux-foundation.org, hannes@...xchg.org, yuzhao@...gle.com, 
	kinseyho@...gle.com, david@...hat.com, mhocko@...nel.org, 
	zhengqi.arch@...edance.com, shakeel.butt@...ux.dev, 
	lorenzo.stoakes@...cle.com, linux-mm@...ck.org, linux-kernel@...r.kernel.org, 
	Hao Jia <jiahao1@...iang.com>
Subject: Re: [PATCH] mm/mglru: Stop try_to_inc_min_seq() if the oldest
 generation LRU lists are not empty

On Tue, Jul 1, 2025 at 10:45 PM Hao Jia <jiahao.kernel@...il.com> wrote:
>
> Perhaps another way to explain it is clearer.
>
> It is known that min_seq[type] has not increased, that is, min_seq[type]
> is equal to lrugen->min_seq[type], then the following:
>
> case 1: min_seq[type] has not been reassigned and changed before
> judgment min_seq[type] <= lrugen->min_seq[type].
>
> Then the subsequent min_seq[type] <= lrugen->min_seq[type] judgment will
> always be true.
>
>
> case 2: min_seq[type] is reassigned to seq, before judgment
> min_seq[type] <= lrugen->min_seq[type].
>
> Then at least the condition of min_seq[type] > seq must be met before
> min_seq[type] will be reassigned to seq.
> That is to say, before the reassignment, lrugen->min_seq[type] > seq is
> met, and then min_seq[type] = seq.
>
> Then the following min_seq[type](seq) <= lrugen->min_seq[type] judgment
> is always true.

This sounds good to me. Can you change the code to use one bool to
detect any increments in `min_seq[type]`? You don't need `int
seq_inc_flags[ANON_AND_FILE] = {0};`

Also update the commit message with what you have here. IMO much more clear.

Thanks,
Yuanchu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ