All of lore.kernel.org
 help / color / mirror / Atom feed
From: Baolin Wang <baolin.wang@linux.alibaba.com>
To: akpm@linux-foundation.org, david@kernel.org, ljs@kernel.org,
	hannes@cmpxchg.org
Cc: riel@surriel.com, liam@infradead.org, vbabka@kernel.org,
	harry@kernel.org, jannh@google.com, lance.yang@linux.dev,
	kasong@tencent.com, qi.zheng@linux.dev, shakeel.butt@linux.dev,
	baohua@kernel.org, axelrasmussen@google.com, yuanchu@google.com,
	weixugc@google.com, mhocko@kernel.org,
	baolin.wang@linux.alibaba.com, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH v4 0/3] promote mapped executable folios after first usage for MGLRU
Date: Mon, 20 Jul 2026 19:11:59 +0800	[thread overview]
Message-ID: <cover.1784509721.git.baolin.wang@linux.alibaba.com> (raw)

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 v3:
https://lore.kernel.org/all/cover.1784268206.git.baolin.wang@linux.alibaba.com/
 - Collect tags from Johannes, Axel, Barry and Kairui. Thanks.
 - Split the helper addition out into a separate patch (per Johannes).
 - Set PG_workingset before promoting in lru_gen_set_refs() (per Kairui).
 - Some code cleanups (per Kairui).

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 (3):
  mm: vmscan: convert folio_referenced() to use vma_flags_t
  mm: vmscan: add a helper to identify file-backed executable folios
  mm: mglru: promote mapped executable folios after first usage

 include/linux/rmap.h |  7 +++--
 mm/rmap.c            | 19 +++++++------
 mm/vmscan.c          | 63 ++++++++++++++++++++++++++++----------------
 3 files changed, 54 insertions(+), 35 deletions(-)

-- 
2.47.3



             reply	other threads:[~2026-07-20 11:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-20 11:11 Baolin Wang [this message]
2026-07-20 11:12 ` [PATCH v4 1/3] mm: vmscan: convert folio_referenced() to use vma_flags_t Baolin Wang
2026-07-20 11:12 ` [PATCH v4 2/3] mm: vmscan: add a helper to identify file-backed executable folios Baolin Wang
2026-07-20 13:27   ` David Hildenbrand (Arm)
2026-07-20 14:26   ` Kairui Song
2026-07-21  7:47   ` Barry Song
2026-07-20 11:12 ` [PATCH v4 3/3] mm: mglru: promote mapped executable folios after first usage Baolin Wang
2026-07-21  8:31   ` Barry Song

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1784509721.git.baolin.wang@linux.alibaba.com \
    --to=baolin.wang@linux.alibaba.com \
    --cc=akpm@linux-foundation.org \
    --cc=axelrasmussen@google.com \
    --cc=baohua@kernel.org \
    --cc=david@kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=harry@kernel.org \
    --cc=jannh@google.com \
    --cc=kasong@tencent.com \
    --cc=lance.yang@linux.dev \
    --cc=liam@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ljs@kernel.org \
    --cc=mhocko@kernel.org \
    --cc=qi.zheng@linux.dev \
    --cc=riel@surriel.com \
    --cc=shakeel.butt@linux.dev \
    --cc=vbabka@kernel.org \
    --cc=weixugc@google.com \
    --cc=yuanchu@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.