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=1796329597; b=e5Tx86KHWcpX53RnW6QHKsfMBaqzyNnnWEuirrAc/ZO3AScemwsxGW4wOcI4o6dkPlz1 QLpXIHO+It7fVCdSQ9EYLwNDOBv5yW50Rrs41HoAMa54b1i+E4NBNEaicfQApzxIj/3A0 LH/+4VUqsRfQysC7TsdBfGFzdq8uxHIo3BcfafgaeVIF8KUM0KEUuzw26B6DigSDTkIrO sBX4L4Bi5f7yzb76UFTEmXGqWq1ByjTALI/N5qz04m6aLDxHQTqCX0dZe4QNWGdfFWfFs CNfH4GYX57Z1sP/YsMWxZCqKQcLVX38lUaWU0SV8bdX9HTBg3KU5cBDWIbjK28VMQig== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796329597; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=v866FzI8lmxRHA+x9mcCVIXyVVP3W2be/Crsvc3XB3A=; b=HfzINJPH2MSlF+pMJivgNpkkMctyhcdhVR+1j4MZ2BnO8Q99NliHq5cvkHQKA6rKPcDx i/hXIhVJ7r2Lq29qiAiVypmxWed33xwfoK7vG+dnzgpUt+P9fnNWaHHBisBA203ntPGqz jOt2/uSNx9F2zGzyH2EZpp56qyCRwZEFPfA2v6Envdatlrpc7+/f74iKLfvs8f+AJEfLl FuJ65Vs0B+hX07l8EV2l4TaYBEeZR7lF80Y7L8cqFSY7Vmh6TRq6JBUu9zD+kxnS3iFzy ub74uzVM5YLDPqn0CVKJhz8dLGJ51kqIyHevvTHBqT8hDYuW1Q09pMtL3S5iyzu2ShA== 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=FZSr2ifI; 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 7C68A606A6A9 for ; Thu, 3 Dec 2026 20:26:37 +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=FZSr2ifI Received: by smtp.kernel.org (Postfix) with ESMTPSA id DD03E1F000CE; Thu, 3 Dec 2026 20:26:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796329597; bh=v866FzI8lmxRHA+x9mcCVIXyVVP3W2be/Crsvc3XB3A=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=FZSr2ifIppEL1CSY59dL/qWkDUqfYm+wELrJDwBp0374aLvgic187eor9qPJlzmy9 Fr1TPQB+899ggFReuxg9tIv64D5SQZYooomiOcejchGUuc/1H5drL6l17qqvRRb6To i0WpK4cPV+mPVP56tSmo5WB54EQ2rhzSG37lhV1o/Rkn+AAzYUrHCceGVfZup8iqrM hcXJVuoraSypK0gCqGhNR9dgdmz/Zb9Q8Kr7oUmda3qQDsmfLHF8Pkjo4lON1+9Sha y7g4v3M50spK6pHVBfSXkde7BRn6HWVUorGHlEMTG7NtrNMWqJ2pQWQHv+vls6Rzks acDjdXSirmcjg== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v8 09/19] mm/mglru: move add/del LRU size accounting out of lru_gen_update_size() 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-9-64f81c876c15@tencent.com> References: <20261204-mglru-fg-v8-0-64f81c876c15@tencent.com> <20261204-mglru-fg-v8-9-64f81c876c15@tencent.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Thu, 03 Dec 2026 20:26:34 +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: commit message omits motivation for lru_gen_update_size() split -- commit da4881038784ea625ea8045aa76a7eaaebdc650b Author: Kairui Song > mm/mglru: move add/del LRU size accounting out of lru_gen_update_size() > > Pure code shuffle, no behavior change. lru_gen_update_size() now only > updates the per-generation counters plus the promotion move; the > addition and deletion active/inactive accounting move to > lru_gen_add_folio() and lru_gen_del_folio(), which know the generation > and can apply the active-window test directly. > > The unevictable case is untouched: unevictable folios never enter > lru_gen_add_folio() and keep being accounted by lruvec_add_folio() as > before. > > Tested-by: Zhao Zhengzhuo > Reviewed-by: Kunwu Chan > Tested-by: Andrew Morton > Tested-by: Wang Lian (ByteDance) > Tested-by: Tianyi Chen > Signed-off-by: Kairui Song [Severity: Low] Could the commit message explain why this split is needed? On its own, moving the active/inactive accounting out of lru_gen_update_size() duplicates the delta, lru, lru_gen_is_active(), and __update_lru_size() logic across lru_gen_add_folio() and lru_gen_del_folio() while still passing -1 to lru_gen_update_size(). Adding a sentence noting that this prepares for folio LRU refs based active/inactive accounting and making folio_inc_lru_refs() lockless would give reviewers and git-blame readers the missing rationale. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261204-mglru-fg-v= 8-0-64f81c876c15@tencent.com?part=3D9