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=1796325704; b=37DGHd8iGAWgBRu1W4PSI4+YuvZ6KKrFqgwYhebk5caspacunsSXVy+SGuPJHAHwAxeU z+v8UQRWyNUREwfbJzBuKpBvr13ZNVpE99jVJl26qiHZtnoDXTsv4K/QFf7AeqR8JZgcv kaLjsKtgfc2kimNOsAUNUoh2UTuFeT0VaK6mzHBR32zilu3CMQ1F8rz4pTprLvhZZfyfi eLbHuEMROro2CeAnSn2o5rG7Ca/oNvyVkTdq1kVVnn+kEUz8HX4j7f//v91/J0Mh0ppoR Z+XY+hdGOdguJAtdfdCxHNal/+Z1877NM6gHKjCguyNuKSgO+beKj1sDG/v+OwJO59Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796325704; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=4tyWYep9v2qrj/jdfQ2qc1Zwn7yQ85XJihKbD77n0RE=; b=m5pI0AxaJu3dz3W7yZGR6hbQCcAtAfHXZeKf7awlYsqLzHVBQZMd8nOYrYLG9yxgMpEr kRzEABSHJgyCplMedWYM+14vy20MHaIydTbeBTBwr23efF8pVfsn+IpEuFp0ZBgSzk+p5 keobwV7O2wKWLNeEXOL9iovP490NAfaIu6JCwLxFLA9WHncbs1RCAgYgrGktHMU0lkSJy pUd2RmTnqaUQCY+wxmUS0AJ6jPwcWUetK5qX0LCEEjRuRDZa8dLxvwK/OcLUec7Q1jHRn NsjrgdwGbEs3gi7NIaiOZRb9ODWGCW1ZQCwpr25+fmwD1PltvghpsS22LDgXyiupYZg== 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="Sx/bNKPn"; 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 E2780606A6A3 for ; Thu, 3 Dec 2026 19:21:43 +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=Sx/bNKPn Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2664F1F0092C; Thu, 3 Dec 2026 19:21:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796325703; bh=4tyWYep9v2qrj/jdfQ2qc1Zwn7yQ85XJihKbD77n0RE=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=Sx/bNKPn7Srr9wC7Ky1cHJ0r+4lZhLHkh3cBErfQ2oxB2AG1X7oCuXzk//p5zgZL8 xLaDm17AzbbkMMTxQOymXt2cJ5yXPvCI3EbUPlQrc+y7/MX1BqkqOlYFmL6J/MZNuG +gAE59gEa0dbYbOiUdKsJgDe3crux0iBdZFCTgTwnEgWAZgYvdPgKWdQyCvPI4PBuZ 0iMeN1gbulb5Gk/u4tIcOIVm8WoljR94fwB0Csz4hdK+wn0Rd43ZiY84lmbFLNw5R3 MYoNAyLdtw4+34VX3QE3DNMIncv/XR0ZNwdd9Q4aPQoID6t/QcaDFX3cJdp1k9mEB1 k9pjC+0MGcf+w== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v8 06/19] mm/mglru: skip the flags cmpxchg when nothing changes 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-6-64f81c876c15@tencent.com> References: <20261204-mglru-fg-v8-0-64f81c876c15@tencent.com> <20261204-mglru-fg-v8-6-64f81c876c15@tencent.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Thu, 03 Dec 2026 19:21:39 +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 log wrongly claims eviction callers hold LRU lock -- commit a5317d3a157c2dedaaf6eca7c4f4d2e09112b99c Author: Ridong Chen mm/mglru: skip the flags cmpxchg when nothing changes This commit skips the try_cmpxchg() on folio->flags in folio_update_gen() and folio_set_lru_refs() when the new flags value is identical to the old one. > No caller relies on the full barrier that the locked instruction > implied on the skipped path: the eviction and isolation callers run > under the LRU lock, and the others (page table walks, > folio_mark_accessed(), lru_gen_clear_refs()) only care about the > resulting flags value, which is already in place. [Severity: Low] Is the commit message accurate in claiming that the eviction callers run under the LRU lock? evict_folios() drops lruvec->lru_lock before shrink_folio_list() and calls folio_set_lru_refs() on isolated folios before move_folios_to_lru() re-acquires it. lru_gen_set_refs() and folio_migrate_lru_refs() also call folio_set_lru_refs() without holding lruvec->lru_lock. The change itself is still safe since these callers work on isolated folios and do not rely on a full barrier here, so the commit log could describe that instead. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261204-mglru-fg-v= 8-0-64f81c876c15@tencent.com?part=3D6