mm-multi-gen-lru-use-pteppmdp_clear_young_notify.patch removed from -mm tree
The quilt patch titled
Subject: mm: multi-gen LRU: use {ptep,pmdp}_clear_young_notify()
has been removed from the -mm tree. Its filename was
mm-multi-gen-lru-use-pteppmdp_clear_young_notify.patch
This patch was dropped because it was merged into the mm-hotfixes-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Yu Zhao <[email protected]>
Subject: mm: multi-gen LRU: use {ptep,pmdp}_clear_young_notify()
Date: Sat, 19 Oct 2024 01:29:39 +0000
When the MM_WALK capability is enabled, memory that is mostly accessed by a VM appears younger than it really is, therefore this memory will be less likely to be evicted. Therefore, the presence of a running VM can significantly increase swap-outs for non-VM memory, regressing the performance for the rest of the system.
Fix this regression by always calling {ptep,pmdp}_clear_young_notify() whenever we clear the young bits on PMDs/PTEs.
---
include/linux/mmzone.h | 5 +- mm/rmap.c | 9 +-- mm/vmscan.c | 91 +++++++++++++++++++++------------------ 3 files changed, 55 insertions(+), 50 deletions(-)
include/linux/mmzone.h renamed from include/linux/mmzone.h~mm-multi-gen-lru-use-pteppmdp_clear_young_notify +3 -2
@@ -555,7 +555,7 @@ struct lru_gen_memcg {void lru_gen_init_pgdat (struct pglist_data *pgdat);void lru_gen_init_lruvec (struct lruvec *lruvec); -void lru_gen_look_around (struct page_vma_mapped_walk *pvmw); +bool lru_gen_look_around (struct page_vma_mapped_walk *pvmw);void lru_gen_init_memcg (struct mem_cgroup *memcg);void lru_gen_exit_memcg (struct mem_cgroup *memcg);
@@ -574,8 +574,9 @@ static inline void lru_gen_init_lruvec(s { } -static inline void lru_gen_look_around (struct page_vma_mapped_walk *pvmw) +static inline bool lru_gen_look_around (struct page_vma_mapped_walk *pvmw) { +return false; }static inline void lru_gen_init_memcg (struct mem_cgroup *memcg)
mm/rmap.c renamed from mm/rmap.c~mm-multi-gen-lru-use-pteppmdp_clear_young_notify +3 -6
@@ -885,13 +885,10 @@ static bool folio_referenced_one(structreturn false; } -if (pvmw.pte) { -if (lru_gen_enabled () && -pte_young (ptep_get (pvmw.pte))) { -lru_gen_look_around (&pvmw); +if (lru_gen_enabled () && pvmw.pte) { +if (lru_gen_look_around (&pvmw)) referenced++; - } - + }else if (pvmw.pte) {if (ptep_clear_flush_young_notify (vma, address, pvmw.pte)) referenced++;
mm/vmscan.c renamed from mm/vmscan.c~mm-multi-gen-lru-use-pteppmdp_clear_young_notify +49 -42
222 lines not on this page · raw message
_
Patches currently in -mm which might be from [email protected] are
mm-page_alloc-keep-track-of-free-highatomic.patch
Quoted 9 lines · Andrew Morton
The quilt patch titled
Subject: mm: multi-gen LRU: use {ptep,pmdp}_clear_young_notify()
has been removed from the -mm tree. Its filename was
mm-multi-gen-lru-use-pteppmdp_clear_young_notify.patchThis patch was dropped because it was merged into the mm-hotfixes-stable branch of
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Hi Andrew,
I posted a fixup for this patch here[1]. It fixes builds for some configs but is otherwise a no-op. Could you apply it? (Do you need anything from me before you can apply it?)
Quoted 11 lines · On Thu, 31 Oct 2024 09:48:16 -0700 James Houghton <[email protected]> wrote:
Quoted 9 lines · Andrew Morton
The quilt patch titled
Subject: mm: multi-gen LRU: use {ptep,pmdp}_clear_young_notify()
has been removed from the -mm tree. Its filename was
mm-multi-gen-lru-use-pteppmdp_clear_young_notify.patchThis patch was dropped because it was merged into the mm-hotfixes-stable branch of
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Quoted 7 lines
Hi Andrew,
I posted a fixup for this patch here[1]. It fixes builds for some configs but is otherwise a no-op. Could you apply it? (Do you need anything from me before you can apply it?)
Got it, thanks. I moved "mm: multi-gen LRU: remove MM_LEAF_OLD and MM_NONLEAF_TOTAL stats" and "mm: multi-gen LRU: use {ptep,pmdp}_clear_young_notify()" back into mm-hotfixes-unstable and added this fixup.