[PATCH v3 0/2] promote mapped executable folios after first usage for MGLRU

Baolin Wang posted 2 patches 1 week ago
There is a newer version of this series
include/linux/rmap.h |  7 +++---
mm/rmap.c            | 19 ++++++++-------
mm/vmscan.c          | 57 ++++++++++++++++++++++++++++----------------
3 files changed, 50 insertions(+), 33 deletions(-)
[PATCH v3 0/2] promote mapped executable folios after first usage for MGLRU
Posted by Baolin Wang 1 week ago
Now MGLRU's protection of mapped executable file folios is less reliable.
Follow the classical LRU's logic, promoting mapped executable file folios
after their first usage to give executable code a better chance to stay in
memory and improve workload performance (See patch 2 for more details).

Changes from v2:
https://lore.kernel.org/all/cover.1784197559.git.baolin.wang@linux.alibaba.com/
 - Add acked tag from David. Thanks.
 - Rename the exec-file-folio helper and move it into vmscan.c (per David).

Changes from v1:
https://lore.kernel.org/all/4b921ed528c483e13c9e22d1ae44ba58b4a15b0b.1784096432.git.baolin.wang@linux.alibaba.com/
 - Add a new patch to clean up vma flags as preparation.
 - Add a new helper to check exec file folios (per Kaisui).
 - Promote exec file folios in lru_gen_set_refs (Per Sashiko). 

Baolin Wang (2):
  mm: vmscan: convert folio_referenced() to use vma_flags_t
  mm: mglru: promote mapped executable folios after first usage

 include/linux/rmap.h |  7 +++---
 mm/rmap.c            | 19 ++++++++-------
 mm/vmscan.c          | 57 ++++++++++++++++++++++++++++----------------
 3 files changed, 50 insertions(+), 33 deletions(-)

-- 
2.47.3
Re: [PATCH v3 0/2] promote mapped executable folios after first usage for MGLRU
Posted by Axel Rasmussen 1 week ago
On Fri, Jul 17, 2026 at 3:06 AM Baolin Wang
<baolin.wang@linux.alibaba.com> wrote:
>
> Now MGLRU's protection of mapped executable file folios is less reliable.
> Follow the classical LRU's logic, promoting mapped executable file folios
> after their first usage to give executable code a better chance to stay in
> memory and improve workload performance (See patch 2 for more details).

Both patches look correct to me, and the premise of the functional
change makes sense. For what it's worth feel free to take (on both):

Reviewed-by: Axel Rasmussen <axelrasmussen@google.com>

>
> Changes from v2:
> https://lore.kernel.org/all/cover.1784197559.git.baolin.wang@linux.alibaba.com/
>  - Add acked tag from David. Thanks.
>  - Rename the exec-file-folio helper and move it into vmscan.c (per David).
>
> Changes from v1:
> https://lore.kernel.org/all/4b921ed528c483e13c9e22d1ae44ba58b4a15b0b.1784096432.git.baolin.wang@linux.alibaba.com/
>  - Add a new patch to clean up vma flags as preparation.
>  - Add a new helper to check exec file folios (per Kaisui).
>  - Promote exec file folios in lru_gen_set_refs (Per Sashiko).
>
> Baolin Wang (2):
>   mm: vmscan: convert folio_referenced() to use vma_flags_t
>   mm: mglru: promote mapped executable folios after first usage
>
>  include/linux/rmap.h |  7 +++---
>  mm/rmap.c            | 19 ++++++++-------
>  mm/vmscan.c          | 57 ++++++++++++++++++++++++++++----------------
>  3 files changed, 50 insertions(+), 33 deletions(-)
>
> --
> 2.47.3
>