mm-mglru-add-config_lru_gen_walks_mmu.patch removed from -mm tree
The quilt patch titled
Subject: mm/mglru: add CONFIG_LRU_GEN_WALKS_MMU
has been removed from the -mm tree. Its filename was
mm-mglru-add-config_lru_gen_walks_mmu.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: Kinsey Ho <[email protected]>
Subject: mm/mglru: add CONFIG_LRU_GEN_WALKS_MMU
Date: Wed, 27 Dec 2023 14:12:02 +0000
Add CONFIG_LRU_GEN_WALKS_MMU such that if disabled, the code that walks page tables to promote pages into the youngest generation will not be built.
Also improves code readability by adding two helper functions get_mm_state() and get_next_mm().
---
include/linux/memcontrol.h | 2 include/linux/mm_types.h | 12 +- include/linux/mmzone.h | 2 kernel/fork.c | 2 mm/Kconfig | 4 mm/vmscan.c | 192 ++++++++++++++++++++++------------- 6 files changed, 139 insertions(+), 75 deletions(-)
include/linux/memcontrol.h renamed from include/linux/memcontrol.h~mm-mglru-add-config_lru_gen_walks_mmu +1 -1
@@ -330,7 +330,7 @@ struct mem_cgroup {struct deferred_split deferred_split_queue;#endif -#ifdef CONFIG_LRU_GEN +#ifdef CONFIG_LRU_GEN_WALKS_MMU /* per-memcg mm_struct list */ struct lru_gen_mm_list mm_list;#endif
include/linux/mm_types.h renamed from include/linux/mm_types.h~mm-mglru-add-config_lru_gen_walks_mmu +8 -4
@@ -958,7 +958,7 @@ struct mm_struct {*/ unsigned long ksm_zero_pages;#endif /* CONFIG_KSM */ -#ifdef CONFIG_LRU_GEN +#ifdef CONFIG_LRU_GEN_WALKS_MMU struct { /* this mm_struct is on lru_gen_mm_list */ struct list_head list;
@@ -973,7 +973,7 @@ struct mm_struct {struct mem_cgroup *memcg; #endif } lru_gen; -#endif /* CONFIG_LRU_GEN */ +#endif /* CONFIG_LRU_GEN_WALKS_MMU */ } __randomize_layout;/*
@@ -1011,6 +1011,10 @@ struct lru_gen_mm_list { spinlock_t lock; }; +#endif /* CONFIG_LRU_GEN */ + +#ifdef CONFIG_LRU_GEN_WALKS_MMU +void lru_gen_add_mm (struct mm_struct *mm);void lru_gen_del_mm (struct mm_struct *mm);#ifdef CONFIG_MEMCG
@@ -1036,7 +1040,7 @@ static inline void lru_gen_use_mm(struct WRITE_ONCE(mm->lru_gen.bitmap, -1); } -#else /* !CONFIG_LRU_GEN */ +#else /* !CONFIG_LRU_GEN_WALKS_MMU */ static inline void lru_gen_add_mm (struct mm_struct *mm) {
@@ -1060,7 +1064,7 @@ static inline void lru_gen_use_mm(struct { } -#endif /* CONFIG_LRU_GEN */ +#endif /* CONFIG_LRU_GEN_WALKS_MMU */ struct vma_iterator {struct ma_state mas;
include/linux/mmzone.h renamed from include/linux/mmzone.h~mm-mglru-add-config_lru_gen_walks_mmu +2 -0
@@ -640,9 +640,11 @@ struct lruvec {#ifdef CONFIG_LRU_GEN /* evictable pages divided into generations */ struct lru_gen_folio lrugen; +#ifdef CONFIG_LRU_GEN_WALKS_MMU /* to concurrently iterate lru_gen_mm_list */ struct lru_gen_mm_state mm_state;#endif +#endif /* CONFIG_LRU_GEN */ #ifdef CONFIG_MEMCG struct pglist_data *pgdat;#endif
kernel/fork.c renamed from kernel/fork.c~mm-mglru-add-config_lru_gen_walks_mmu +1 -1
@@ -2946,7 +2946,7 @@ pid_t kernel_clone(struct kernel_clone_aget_task_struct (p); } -if (IS_ENABLED (CONFIG_LRU_GEN ) && !(clone_flags &CLONE_VM )) { +if (IS_ENABLED (CONFIG_LRU_GEN_WALKS_MMU ) && !(clone_flags &CLONE_VM )) {/* lock the task to synchronize with memcg migration */ task_lock (p);lru_gen_add_mm (p->mm);
mm/Kconfig renamed from mm/Kconfig~mm-mglru-add-config_lru_gen_walks_mmu +4 -0
@@ -1274,6 +1274,10 @@ config LRU_GEN_STATS from evicted generations for debugging purpose. This option has a per-memcg and per-node memory overhead. + +config LRU_GEN_WALKS_MMU + def_bool y + depends on LRU_GEN && ARCH_HAS_HW_PTE_YOUNG # } config ARCH_SUPPORTS_PER_VMA_LOCK
mm/vmscan.c renamed from mm/vmscan.c~mm-mglru-add-config_lru_gen_walks_mmu +123 -69
431 lines not on this page · raw message
_
Patches currently in -mm which might be from [email protected] are