* [merged mm-stable] mm-add-folio_test_lazyfree-helper.patch removed from -mm tree
@ 2026-03-24 21:43 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2026-03-24 21:43 UTC (permalink / raw)
To: mm-commits, ziy, ryan.roberts, rostedt, npache, mhiramat,
mathieu.desnoyers, lorenzo.stoakes, Liam.Howlett, lance.yang,
dev.jain, david, baolin.wang, baohua, yanglincheng, akpm
The quilt patch titled
Subject: mm: add folio_test_lazyfree helper
has been removed from the -mm tree. Its filename was
mm-add-folio_test_lazyfree-helper.patch
This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Vernon Yang <yanglincheng@kylinos.cn>
Subject: mm: add folio_test_lazyfree helper
Date: Sat, 21 Feb 2026 17:39:17 +0800
Add folio_test_lazyfree() function to identify lazy-free folios to improve
code readability.
Link: https://lkml.kernel.org/r/20260221093918.1456187-4-vernon2gm@gmail.com
Signed-off-by: Vernon Yang <yanglincheng@kylinos.cn>
Acked-by: David Hildenbrand (Red Hat) <david@kernel.org>
Reviewed-by: Lance Yang <lance.yang@linux.dev>
Reviewed-by: Dev Jain <dev.jain@arm.com>
Reviewed-by: Barry Song <baohua@kernel.org>
Cc: Baolin Wang <baolin.wang@linux.alibaba.com>
Cc: Liam Howlett <Liam.Howlett@oracle.com>
Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Nico Pache <npache@redhat.com>
Cc: Ryan Roberts <ryan.roberts@arm.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Zi Yan <ziy@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
include/linux/page-flags.h | 5 +++++
mm/rmap.c | 2 +-
mm/vmscan.c | 5 ++---
3 files changed, 8 insertions(+), 4 deletions(-)
--- a/include/linux/page-flags.h~mm-add-folio_test_lazyfree-helper
+++ a/include/linux/page-flags.h
@@ -724,6 +724,11 @@ static __always_inline bool folio_test_a
return ((unsigned long)folio->mapping & FOLIO_MAPPING_ANON) != 0;
}
+static __always_inline bool folio_test_lazyfree(const struct folio *folio)
+{
+ return folio_test_anon(folio) && !folio_test_swapbacked(folio);
+}
+
static __always_inline bool PageAnonNotKsm(const struct page *page)
{
unsigned long flags = (unsigned long)page_folio(page)->mapping;
--- a/mm/rmap.c~mm-add-folio_test_lazyfree-helper
+++ a/mm/rmap.c
@@ -2060,7 +2060,7 @@ static bool try_to_unmap_one(struct foli
}
if (!pvmw.pte) {
- if (folio_test_anon(folio) && !folio_test_swapbacked(folio)) {
+ if (folio_test_lazyfree(folio)) {
if (unmap_huge_pmd_locked(vma, pvmw.address, pvmw.pmd, folio))
goto walk_done;
/*
--- a/mm/vmscan.c~mm-add-folio_test_lazyfree-helper
+++ a/mm/vmscan.c
@@ -963,8 +963,7 @@ static void folio_check_dirty_writeback(
* They could be mistakenly treated as file lru. So further anon
* test is needed.
*/
- if (!folio_is_file_lru(folio) ||
- (folio_test_anon(folio) && !folio_test_swapbacked(folio))) {
+ if (!folio_is_file_lru(folio) || folio_test_lazyfree(folio)) {
*dirty = false;
*writeback = false;
return;
@@ -1508,7 +1507,7 @@ retry:
}
}
- if (folio_test_anon(folio) && !folio_test_swapbacked(folio)) {
+ if (folio_test_lazyfree(folio)) {
/* follow __remove_mapping for reference */
if (!folio_ref_freeze(folio, 1))
goto keep_locked;
_
Patches currently in -mm which might be from yanglincheng@kylinos.cn are
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-03-24 21:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-24 21:43 [merged mm-stable] mm-add-folio_test_lazyfree-helper.patch removed from -mm tree Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.