mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Baolin Wang <baolin.wang@linux.alibaba.com>
To: "Barry Song (Xiaomi)" <baohua@kernel.org>, akpm@linux-foundation.org
Cc: axelrasmussen@google.com, baoquan.he@linux.dev, david@kernel.org,
	hannes@cmpxchg.org, kasong@tencent.com,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org, ljs@kernel.org,
	mhocko@kernel.org, qi.zheng@linux.dev, ridong.chen@linux.dev,
	shakeel.butt@linux.dev, weixugc@google.com, yuanchu@google.com,
	yuzhao@google.com, Chuanhua Han <hanchuanhua802@gmail.com>
Subject: Re: [PATCH] mm/mglru: restore accidentally removed seq < max_seq check
Date: Wed, 16 Sep 2026 11:23:59 +0800	[thread overview]
Message-ID: <7afc2108-710d-4f54-9472-6b9f156ce945@linux.alibaba.com> (raw)
In-Reply-To: <20260915101556.50467-1-baohua@kernel.org>



On 9/15/26 6:15 PM, Barry Song (Xiaomi) wrote:
> Since commit 798c0330c2ca ("mm/mglru: rework aging feedback"),
> the following sanity check was accidentally removed:
>         if (seq < max_seq)
>                 return 0;
> 
> That means we can perform aging for any value less than or equal to
> max_gen_nr.
> 
> This has been inconsistent with
> Documentation/admin-guide/mm/multigen_lru.rst, which states:
> 
>   Users can write the following command to ``lru_gen`` to create a new
>   generation ``max_gen_nr+1``:
> 
>       ``+ memcg_id node_id max_gen_nr [can_swap [force_scan]]``
> 
> The correct semantics are that writing a value smaller than
> max_gen_nr should return 0, since the requested generation already
> exists.
> 
> Fixes: 798c0330c2ca ("mm/mglru: rework aging feedback")
> Reported-by: Chuanhua Han <hanchuanhua802@gmail.com>
> Signed-off-by: Barry Song (Xiaomi) <baohua@kernel.org>
> ---

LGTM.
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>

  reply	other threads:[~2026-09-16  3:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-15 10:15 Barry Song (Xiaomi)
2026-09-16  3:23 ` Baolin Wang [this message]
2026-09-16  8:41 ` Kairui Song

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=7afc2108-710d-4f54-9472-6b9f156ce945@linux.alibaba.com \
    --to=baolin.wang@linux.alibaba.com \
    --cc=akpm@linux-foundation.org \
    --cc=axelrasmussen@google.com \
    --cc=baohua@kernel.org \
    --cc=baoquan.he@linux.dev \
    --cc=david@kernel.org \
    --cc=hanchuanhua802@gmail.com \
    --cc=hannes@cmpxchg.org \
    --cc=kasong@tencent.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ljs@kernel.org \
    --cc=mhocko@kernel.org \
    --cc=qi.zheng@linux.dev \
    --cc=ridong.chen@linux.dev \
    --cc=shakeel.butt@linux.dev \
    --cc=weixugc@google.com \
    --cc=yuanchu@google.com \
    --cc=yuzhao@google.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®