From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A1ED53AB29C for ; Thu, 23 Apr 2026 18:14:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776968062; cv=none; b=SudrXMs9g9yrAIe5+rPl/zD+x2kbZy62Yv2ivg1LpYXXtGLtFiODwCSefCKYVr/wgYyTgT0zUM4+9AiIWLO2O994Tq4LSWcH/cn9lZCEKGvZop+wjb2QRDsN/4GHHm40TajdsEkjWk7WJMwhMpUtor5VLQ3bV4/KS/Rzj0N0Cvo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776968062; c=relaxed/simple; bh=g4v2+sOWDflsuWeAYCyjSYDIwqJFsdPQQ6Too2N+EF8=; h=Date:To:From:Subject:Message-Id; b=lGRgBO6Q4dSxS0nqP3dYNPIRt7vWDCbUY7UN36qxh2/bcVBPNUuIPDq+SInG4fooWYlxkLSj55b2i42rloR9h09+uf3hF+8YvDJhrSIvZmKidiGyLARgD93MYEy/xXxE8/5djRQ2Ypf/V5ThxZ6zu+Xa1rk0aM/p9QscVMK+dj8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=hpI//b3v; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="hpI//b3v" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3FDBFC2BCAF; Thu, 23 Apr 2026 18:14:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1776968062; bh=g4v2+sOWDflsuWeAYCyjSYDIwqJFsdPQQ6Too2N+EF8=; h=Date:To:From:Subject:From; b=hpI//b3v2AKhK0qUCwWDms3LbZMel2l9RUze0coNqY8Mv1E5lsDtA9UCstxf5hnCa y53R+Wv6RAibpJBrzSFnAbe/jIUursNL6gqgKpYU1tbIUSJdlh0IXP4x/savYqhu1a gLyJP4FrCG9NxmKAXsL+yYOBbSwmkrJMUPDQP4r0= Date: Thu, 23 Apr 2026 11:14:21 -0700 To: mm-commits@vger.kernel.org,kasong@tencent.com,akpm@linux-foundation.org From: Andrew Morton Subject: + mm-mglru-rename-variables-related-to-aging-and-rotation.patch added to mm-new branch Message-Id: <20260423181422.3FDBFC2BCAF@smtp.kernel.org> Precedence: bulk X-Mailing-List: mm-commits@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: The patch titled Subject: mm/mglru: rename variables related to aging and rotation has been added to the -mm mm-new branch. Its filename is mm-mglru-rename-variables-related-to-aging-and-rotation.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-mglru-rename-variables-related-to-aging-and-rotation.patch This patch will later appear in the mm-new branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Note, mm-new is a provisional staging ground for work-in-progress patches, and acceptance into mm-new is a notification for others take notice and to finish up reviews. Please do not hesitate to respond to review feedback and post updated versions to replace or incrementally fixup patches in mm-new. The mm-new branch of mm.git is not included in linux-next If a few days of testing in mm-new is successful, the patch will me moved into mm.git's mm-unstable branch, which is included in linux-next Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via various branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there most days ------------------------------------------------------ From: Kairui Song Subject: mm/mglru: rename variables related to aging and rotation Date: Fri, 24 Apr 2026 01:43:13 +0800 The current variable name isn't helpful. Make the variable names more meaningful. Only naming change, no behavior change. Link: https://lore.kernel.org/20260424-mglru-reclaim-v6-2-a57622d770c3@tencent.com Signed-off-by: Kairui Song Suggested-by: Barry Song Reviewed-by: Baolin Wang Reviewed-by: Chen Ridong Reviewed-by: Barry Song Reviewed-by: Axel Rasmussen Cc: Chris Li Cc: David Hildenbrand Cc: David Stevens Cc: Johannes Weiner Cc: Kalesh Singh Cc: Leno Hou Cc: Lorenzo Stoakes Cc: Michal Hocko Cc: Qi Zheng Cc: Shakeel Butt Cc: Suren Baghdasaryan Cc: Vernon Yang Cc: Wei Xu Cc: Yafang Cc: Yuanchu Xie Cc: Yu Zhao Signed-off-by: Andrew Morton --- mm/vmscan.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) --- a/mm/vmscan.c~mm-mglru-rename-variables-related-to-aging-and-rotation +++ a/mm/vmscan.c @@ -4934,7 +4934,7 @@ static bool should_run_aging(struct lruv */ static long get_nr_to_scan(struct lruvec *lruvec, struct scan_control *sc, int swappiness) { - bool success; + bool need_aging; unsigned long nr_to_scan; struct mem_cgroup *memcg = lruvec_memcg(lruvec); DEFINE_MAX_SEQ(lruvec); @@ -4942,7 +4942,7 @@ static long get_nr_to_scan(struct lruvec if (mem_cgroup_below_min(sc->target_mem_cgroup, memcg)) return -1; - success = should_run_aging(lruvec, max_seq, swappiness, &nr_to_scan); + need_aging = should_run_aging(lruvec, max_seq, swappiness, &nr_to_scan); /* try to scrape all its memory if this memcg was deleted */ if (nr_to_scan && !mem_cgroup_online(memcg)) @@ -4951,7 +4951,7 @@ static long get_nr_to_scan(struct lruvec nr_to_scan = apply_proportional_protection(memcg, sc, nr_to_scan); /* try to get away with not aging at the default priority */ - if (!success || sc->priority == DEF_PRIORITY) + if (!need_aging || sc->priority == DEF_PRIORITY) return nr_to_scan >> sc->priority; /* stop scanning this lruvec as it's low on cold folios */ @@ -5040,7 +5040,7 @@ static bool try_to_shrink_lruvec(struct static int shrink_one(struct lruvec *lruvec, struct scan_control *sc) { - bool success; + bool need_rotate; unsigned long scanned = sc->nr_scanned; unsigned long reclaimed = sc->nr_reclaimed; struct mem_cgroup *memcg = lruvec_memcg(lruvec); @@ -5058,7 +5058,7 @@ static int shrink_one(struct lruvec *lru memcg_memory_event(memcg, MEMCG_LOW); } - success = try_to_shrink_lruvec(lruvec, sc); + need_rotate = try_to_shrink_lruvec(lruvec, sc); shrink_slab(sc->gfp_mask, pgdat->node_id, memcg, sc->priority); @@ -5068,10 +5068,10 @@ static int shrink_one(struct lruvec *lru flush_reclaim_state(sc); - if (success && mem_cgroup_online(memcg)) + if (need_rotate && mem_cgroup_online(memcg)) return MEMCG_LRU_YOUNG; - if (!success && lruvec_is_sizable(lruvec, sc)) + if (!need_rotate && lruvec_is_sizable(lruvec, sc)) return 0; /* one retry if offlined or too small */ _ Patches currently in -mm which might be from kasong@tencent.com are mm-mglru-consolidate-common-code-for-retrieving-evictable-size.patch mm-mglru-rename-variables-related-to-aging-and-rotation.patch mm-mglru-relocate-the-lru-scan-batch-limit-to-callers.patch mm-mglru-restructure-the-reclaim-loop.patch mm-mglru-scan-and-count-the-exact-number-of-folios.patch mm-mglru-use-a-smaller-batch-for-reclaim.patch mm-mglru-dont-abort-scan-immediately-right-after-aging.patch mm-mglru-remove-redundant-swap-constrained-check-upon-isolation.patch mm-mglru-use-the-common-routine-for-dirty-writeback-reactivation.patch mm-mglru-simplify-and-improve-dirty-writeback-handling.patch mm-mglru-remove-no-longer-used-reclaim-argument-for-folio-protection.patch mm-vmscan-remove-sc-file_taken.patch mm-vmscan-remove-sc-unqueued_dirty.patch mm-vmscan-unify-writeback-reclaim-statistic-and-throttling.patch