mm-mglru-make-lru-folio-prefetch-helper-an-inline-function.patch removed from -mm tree
The quilt patch titled
Subject: mm/mglru: make LRU folio prefetch helper an inline function
has been removed from the -mm tree. Its filename was
mm-mglru-make-lru-folio-prefetch-helper-an-inline-function.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: "Barry Song (Xiaomi)" <[email protected]>
Subject: mm/mglru: make LRU folio prefetch helper an inline function
Date: Wed, 2 Sep 2026 07:24:19 +0800
prefetchw_prev_lru_folio() is currently implemented as a macro with a potentially unused argument. This makes the helper harder to read and can also trigger checkpatch warnings about unused macro arguments.
Make it a static inline function and remove the unnecessary _field argument. The helper always prefetches the previous folio's flags, so there is no need to make the field configurable.
---
mm/vmscan.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-)
mm/vmscan.c renamed from mm/vmscan.c~mm-mglru-make-lru-folio-prefetch-helper-an-inline-function +15 -11
@@ -182,17 +182,21 @@ struct scan_control { };#ifdef ARCH_HAS_PREFETCHW -#define prefetchw_prev_lru_folio (_folio, _base, _field) \ - do { \ - if ((_folio)->lru.prev != _base) { \ - struct folio *prev; \ - \ - prev = lru_to_folio(&(_folio->lru)); \ - prefetchw(&prev->_field); \ - } \ - } while (0) +static inline void prefetchw_prev_lru_folio (struct folio *folio, +struct list_head *base) +{ +if (folio->lru.prev != base) { +struct folio *prev; + + prev =lru_to_folio (&folio->lru); +prefetchw (&prev->flags); + } +}#else -#define prefetchw_prev_lru_folio (_folio, _base, _field) do { } while (0) +static inline void prefetchw_prev_lru_folio (struct folio *folio, +struct list_head *base) +{ +}#endif /*
@@ -1700,7 +1704,7 @@ static unsigned long isolate_lru_folios(struct folio *folio; folio =lru_to_folio (src); -prefetchw_prev_lru_folio (folio, src, flags); +prefetchw_prev_lru_folio (folio, src); nr_pages =folio_nr_pages (folio); total_scan += nr_pages;
_
Patches currently in -mm which might be from [email protected] are
mm-mglru-restore-accidentally-removed-seq-max_seq-check.patch