From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796336311; b=XaS/drGHiqk5moUYiMnnZZouJUYY5bCWd917WKuveXiur8Z3IkKEVGi9kwcbrLPToSnF PujtVpRmtzWOOUC4BbJDz0eY/Lb6zsNuVunARU5bHc1D1fseQHTfnItRBBC75CuIHc+w6 Fp1pUrUDCxNmPcby095IUlRe6OqaSv6y22B2HqFnpV5FUkRML5qefpfksOd/zcnC54a1r vS4L+kB3/YIj4v37KHqhv9qkjLWkD/DZsLgh4kNDyYuUh8DFNaRAB76T+nn3i4/mt6DUt tqPlCX3GpAoN5aK9GJ1upn+VKfGmUkUW242GPyfD0IjGFDB6EA1JmE+E2tcsyjfAfAg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796336311; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=jBqLHmpp60XppxD9NeK3D4bWHbdcG01Fk1JpjSxqalc=; b=0MK10NF3Ax/xmj5Z9DoVmc9focLPdGRwUtvOw0Eu85LtTJalhCeUqbxKoqChTkZ0y+9R TKHOxbTfHMMIYq/QGrbSz60TT91P5cGCLAhlxb8Amr/CHZ3oClQs/LMbp490OZzi/iX1Z bbXdSaQFH0Rcuj1E5MpNx0NHw7k0as+2OAJzs64Hgo35HPwnqi4VpYM9DlBXIAbEKL5j3 xS/9snFL9kEMGzJEWHQLSyo6PD7W2qrX/T5eUJ2WhcGVzmc//F+WL2sBJMeXdm2GlXhuc K49QyCJ4+1xpmPIaoxWz2IpfLLfq0ObUczWeKGlL1G3WzWf9bLRBjHyb85MQCRd/Kjw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=URhEy9mt; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 49B6A606A322 for ; Thu, 3 Dec 2026 22:18:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=URhEy9mt Received: by smtp.kernel.org (Postfix) with ESMTPSA id EE5A71F000C2; Thu, 3 Dec 2026 22:18:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796336310; bh=jBqLHmpp60XppxD9NeK3D4bWHbdcG01Fk1JpjSxqalc=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=URhEy9mts2NpvkqLIpHgZETD75bxMxo9uU3s+f/3MapAXDdSSSf7KrMbS2GiiZ4t5 XqDzNEAh284GprmT/husm3UUBsZGPRrHlZBT+0/H0FFCAWg/SU+ZiRPZ2qrvn5x5uc NKNvXFPduznBrDQ+4OqDRkZ8Cj0wng1gMPSCqAOFihURPx7zdWibxhkFaujTVzQ9co 3Sopv8pxd5JbTGhxRLqyOFHrEzX8bY+ErbA636Y82OyhL2t8WnPIdK5m/I434f9S38 jnbCqFzhml49BcEGGV8rC+Ywvzpf4yBcTut3VBbKseX2PF9Guxzc427+6sSfC3PIdQ +dwQ9ZRhmGB+A== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v8 18/19] mm/mglru: folio LRU refs based active/inactive number accounting Reply-To: sashiko-reviews@lists.linux.dev To: "Kairui Song" , linux-mm@kvack.org Cc: "Andrew Morton" , "Johannes Weiner" , "Muchun Song" , "Qi Zheng" , "Ying Huang" , "Chris Li" , "Baoquan He" , "Nico Pache" , "Usama Arif" , "Michal Hocko" , "Roman Gushchin" , "Shakeel Butt" , "David Hildenbrand" , "Lorenzo Stoakes" , "Liam R. Howlett" , "Barry Song" , "Axel Rasmussen" , "Yuanchu Xie" , "Wei Xu" , "Vlastimil Babka" , "Suren Baghdasaryan" , "Nhat Pham" , "Youngjun Park" , "Zi Yan" , "Gregory Price" , =?utf-8?b?TWF0dGhldyBXaWxjb3ggKE9yYWNsZSk=?= , "Baolin Wang" , "Ryan Roberts" , "Dev Jain" , "Lance Yang" , "Hugh Dickins" , "SJ Park" , "David Rientjes" , "Yu Zhao" , "Vernon Yang" , "Zicheng Wang" , "Tal Zussman" , "Kairui Song" , "Xiang Liu" , "Ehab Ababneh" , "Zhao Zhengzhuo" , "Lian Wang" , "Joanne Koong" , "Kunwu Chan" , "Hui Zhu" , "Maxim Muzafarov" , "Tianyi Chen" , "Aveline Noir" , damon@lists.linux.dev, "Ridong Chen" , tj@kernel.org, mkoutny@suse.com In-Reply-To: <20261204-mglru-fg-v8-18-64f81c876c15@tencent.com> References: <20261204-mglru-fg-v8-0-64f81c876c15@tencent.com> <20261204-mglru-fg-v8-18-64f81c876c15@tencent.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Thu, 03 Dec 2026 22:18:27 +0000 X-Mailing-List: damon@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Low] mm/mglru: MGLRU and LRU-refs helpers remain in include/linux/mm_inline.h -- commit 70cce79e82aba13eb665d2df32d86bad5be87398 Author: Kairui Song mm/mglru: folio LRU refs based active/inactive number accounting This commit switches MGLRU active/inactive LRU size accounting from the generation window to per-folio LRU refs counts, treating folios at or above LRU_REFS_ACTIVATED as active. It adds folio_reset_lru_refs() and batches active/inactive updates during page table walks. > diff --git a/include/linux/mm_inline.h b/include/linux/mm_inline.h > index 51e896d4e07bb..e198456e0607a 100644 > --- a/include/linux/mm_inline.h > +++ b/include/linux/mm_inline.h [ ... ] > @@ -322,6 +342,12 @@ static __always_inline bool folio_test_workingset(co= nst struct folio *folio) > } > =20 > #ifdef CONFIG_LRU_GEN > +static inline bool lru_refs_is_active(unsigned int refs) > +{ > + VM_WARN_ON_ONCE(refs > LRU_REFS_MAX); > + return refs >=3D LRU_REFS_ACTIVATED; > +} > + [Severity: Low] As reported by David Hildenbrand (Arm) on v6 [1], should these MGLRU and LRU-refs helpers move out of include/linux/mm_inline.h into a dedicated header such as mglru.h or vmscan.h? This patch adds lru_refs_is_active() and folio_reset_lru_refs() and expands __folio_set_lru_refs(), lru_gen_add_folio(), and lru_gen_del_folio() here. mm_inline.h is included widely outside mm/, whereas these MGLRU helpers are only used within mm/ and mm_inline.h. [1] https://lore.kernel.org/r/1b88fc30-a3d9-473c-92b7-701cc563be1c@kernel.o= rg --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261204-mglru-fg-v= 8-0-64f81c876c15@tencent.com?part=3D18