From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out30-133.freemail.mail.aliyun.com (out30-133.freemail.mail.aliyun.com [115.124.30.133]) (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 145CE3EBF16 for ; Fri, 17 Jul 2026 10:06:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784282767; cv=none; b=WDiXEuCzFCjfMuQAdfOeX1B5phQAg8butF87zyzu98ykHPextvf9qlybkogaXOQiSsicjpOpusX++QW8N5LzOt0DfZ2okt06Ho32he9l91lk95pBmm+Z+tiO58MWMr9s2bRWlWH6fdqUsC2deBWYSO35xNcjfvOEiEdTtnOlpnA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784282767; c=relaxed/simple; bh=ApPhfxqH8YQOruYk8xzKH5GYybZVEaGWgyoXtnA20vw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=tttxhPCvtm6VjabaTI+kzBDCe6dH0XTIhA7MwrbHZWdmXg7T5OW2FG4ndgZB7hunKuTVAF7N5U0Zm3xWvzA4XTkJ1aAVA3hXWSuKcQ9Y4p/Msym4+gMo6mlrX2CBkLFbYEHWn27r+qBKL+jlOusrZurDtxBENeBtI5weukbUgnI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=bmIf7OgU; arc=none smtp.client-ip=115.124.30.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="bmIf7OgU" DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1784282756; h=From:To:Subject:Date:Message-ID:MIME-Version; bh=GGpuWppMNLwSma9fnETfLXGavT4uWf5/PQfaRR0Qoc4=; b=bmIf7OgUPI1JxuQkyly9zyQ64GBR6JNi067b6p7c7yuJrVmvQ48srj/FSnJdwebc0oiYFiXcCxJHDBBi6w+3Vweie9wRbVASB7V8N8XtaQvTy0ESkN/x00DUkK9nlH9UKojs1sN48PI9cmyggxrY9EcGZBnSY7vPTAwOZW5yXGI= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R771e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=maildocker-contentspam033045098064;MF=baolin.wang@linux.alibaba.com;NM=1;PH=DS;RN=21;SR=0;TI=SMTPD_---0X7Gx5cC_1784282753; Received: from localhost(mailfrom:baolin.wang@linux.alibaba.com fp:SMTPD_---0X7Gx5cC_1784282753 cluster:ay36) by smtp.aliyun-inc.com; Fri, 17 Jul 2026 18:05:54 +0800 From: Baolin Wang 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 v3 0/2] promote mapped executable folios after first usage for MGLRU Date: Fri, 17 Jul 2026 18:05:32 +0800 Message-ID: X-Mailer: git-send-email 2.43.5 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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