diff --git a/include/kernel-6.0 b/include/kernel-6.0 index 88363aed7..1777749cf 100644 --- a/include/kernel-6.0 +++ b/include/kernel-6.0 @@ -1,2 +1,2 @@ -LINUX_VERSION-6.0 = .2 -LINUX_KERNEL_HASH-6.0.2 = a13c26388cacccb684cd9f51109596a280c8186b7e95174d31ee7c5718e95c9d +LINUX_VERSION-6.0 = .3 +LINUX_KERNEL_HASH-6.0.3 = b0d522241805794d8af3a67d331ba063a16496c6fb6d365d48f7ed78ee1c3dcf diff --git a/target/linux/generic/backport-6.0/100-mm-x86-arm64-add-arch_has_hw_pte_young.patch b/target/linux/generic/backport-6.0/100-mm-x86-arm64-add-arch_has_hw_pte_young.patch index 37d058e2a..18530fae9 100644 --- a/target/linux/generic/backport-6.0/100-mm-x86-arm64-add-arch_has_hw_pte_young.patch +++ b/target/linux/generic/backport-6.0/100-mm-x86-arm64-add-arch_has_hw_pte_young.patch @@ -44,11 +44,9 @@ Change-Id: Ib49b44fb56df3333a2ff1fcc496fb1980b976e7a mm/memory.c | 14 +------------- 4 files changed, 19 insertions(+), 29 deletions(-) -diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h -index b5df82aa99e6..71a1af42f0e8 100644 --- a/arch/arm64/include/asm/pgtable.h +++ b/arch/arm64/include/asm/pgtable.h -@@ -1082,24 +1082,13 @@ static inline void update_mmu_cache(struct vm_area_struct *vma, +@@ -1082,24 +1082,13 @@ static inline void update_mmu_cache(stru * page after fork() + CoW for pfn mappings. We don't always have a * hardware-managed access flag on arm64. */ @@ -75,11 +73,9 @@ index b5df82aa99e6..71a1af42f0e8 100644 static inline bool pud_sect_supported(void) { -diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h -index 44e2d6f1dbaa..dc5f7d8ef68a 100644 --- a/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h -@@ -1431,10 +1431,10 @@ static inline bool arch_has_pfn_modify_check(void) +@@ -1431,10 +1431,10 @@ static inline bool arch_has_pfn_modify_c return boot_cpu_has_bug(X86_BUG_L1TF); } @@ -93,11 +89,9 @@ index 44e2d6f1dbaa..dc5f7d8ef68a 100644 } #ifdef CONFIG_PAGE_TABLE_CHECK -diff --git a/include/linux/pgtable.h b/include/linux/pgtable.h -index 014ee8f0fbaa..95f408df4695 100644 --- a/include/linux/pgtable.h +++ b/include/linux/pgtable.h -@@ -260,6 +260,19 @@ static inline int pmdp_clear_flush_young(struct vm_area_struct *vma, +@@ -260,6 +260,19 @@ static inline int pmdp_clear_flush_young #endif /* CONFIG_TRANSPARENT_HUGEPAGE */ #endif @@ -117,8 +111,6 @@ index 014ee8f0fbaa..95f408df4695 100644 #ifndef __HAVE_ARCH_PTEP_GET_AND_CLEAR static inline pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long address, -diff --git a/mm/memory.c b/mm/memory.c -index a78814413ac0..68294ce1cb06 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -125,18 +125,6 @@ int randomize_va_space __read_mostly = @@ -140,7 +132,7 @@ index a78814413ac0..68294ce1cb06 100644 #ifndef arch_wants_old_prefaulted_pte static inline bool arch_wants_old_prefaulted_pte(void) { -@@ -2870,7 +2858,7 @@ static inline bool __wp_page_copy_user(struct page *dst, struct page *src, +@@ -2872,7 +2860,7 @@ static inline bool __wp_page_copy_user(s * On architectures with software "accessed" bits, we would * take a double page fault, so mark it accessed here. */ @@ -149,6 +141,3 @@ index a78814413ac0..68294ce1cb06 100644 pte_t entry; vmf->pte = pte_offset_map_lock(mm, vmf->pmd, addr, &vmf->ptl); --- -2.17.1 - diff --git a/target/linux/generic/backport-6.0/101-mm-x86-add-CONFIG_ARCH_HAS_NONLEAF_PMD_YOUNG.patch b/target/linux/generic/backport-6.0/101-mm-x86-add-CONFIG_ARCH_HAS_NONLEAF_PMD_YOUNG.patch index 5789717e1..2d105ad6a 100644 --- a/target/linux/generic/backport-6.0/101-mm-x86-add-CONFIG_ARCH_HAS_NONLEAF_PMD_YOUNG.patch +++ b/target/linux/generic/backport-6.0/101-mm-x86-add-CONFIG_ARCH_HAS_NONLEAF_PMD_YOUNG.patch @@ -50,8 +50,6 @@ Change-Id: I1a17be3ae926f721f7b17ea1539e5c39e8c4f9a8 include/linux/pgtable.h | 4 ++-- 5 files changed, 17 insertions(+), 4 deletions(-) -diff --git a/arch/Kconfig b/arch/Kconfig -index 8b311e400ec1..bf19a84fffa2 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -1418,6 +1418,14 @@ config DYNAMIC_SIGFRAME @@ -69,8 +67,6 @@ index 8b311e400ec1..bf19a84fffa2 100644 source "kernel/gcov/Kconfig" source "scripts/gcc-plugins/Kconfig" -diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig -index f9920f1341c8..674d694a665e 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -85,6 +85,7 @@ config X86 @@ -81,11 +77,9 @@ index f9920f1341c8..674d694a665e 100644 select ARCH_HAS_UACCESS_FLUSHCACHE if X86_64 select ARCH_HAS_COPY_MC if X86_64 select ARCH_HAS_SET_MEMORY -diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h -index dc5f7d8ef68a..5059799bebe3 100644 --- a/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h -@@ -815,7 +815,8 @@ static inline unsigned long pmd_page_vaddr(pmd_t pmd) +@@ -815,7 +815,8 @@ static inline unsigned long pmd_page_vad static inline int pmd_bad(pmd_t pmd) { @@ -95,11 +89,9 @@ index dc5f7d8ef68a..5059799bebe3 100644 } static inline unsigned long pages_to_mb(unsigned long npg) -diff --git a/arch/x86/mm/pgtable.c b/arch/x86/mm/pgtable.c -index a932d7712d85..8525f2876fb4 100644 --- a/arch/x86/mm/pgtable.c +++ b/arch/x86/mm/pgtable.c -@@ -550,7 +550,7 @@ int ptep_test_and_clear_young(struct vm_area_struct *vma, +@@ -550,7 +550,7 @@ int ptep_test_and_clear_young(struct vm_ return ret; } @@ -108,7 +100,7 @@ index a932d7712d85..8525f2876fb4 100644 int pmdp_test_and_clear_young(struct vm_area_struct *vma, unsigned long addr, pmd_t *pmdp) { -@@ -562,6 +562,9 @@ int pmdp_test_and_clear_young(struct vm_area_struct *vma, +@@ -562,6 +562,9 @@ int pmdp_test_and_clear_young(struct vm_ return ret; } @@ -118,11 +110,9 @@ index a932d7712d85..8525f2876fb4 100644 int pudp_test_and_clear_young(struct vm_area_struct *vma, unsigned long addr, pud_t *pudp) { -diff --git a/include/linux/pgtable.h b/include/linux/pgtable.h -index 95f408df4695..d9095251bffd 100644 --- a/include/linux/pgtable.h +++ b/include/linux/pgtable.h -@@ -213,7 +213,7 @@ static inline int ptep_test_and_clear_young(struct vm_area_struct *vma, +@@ -213,7 +213,7 @@ static inline int ptep_test_and_clear_yo #endif #ifndef __HAVE_ARCH_PMDP_TEST_AND_CLEAR_YOUNG @@ -131,7 +121,7 @@ index 95f408df4695..d9095251bffd 100644 static inline int pmdp_test_and_clear_young(struct vm_area_struct *vma, unsigned long address, pmd_t *pmdp) -@@ -234,7 +234,7 @@ static inline int pmdp_test_and_clear_young(struct vm_area_struct *vma, +@@ -234,7 +234,7 @@ static inline int pmdp_test_and_clear_yo BUILD_BUG(); return 0; } @@ -140,6 +130,3 @@ index 95f408df4695..d9095251bffd 100644 #endif #ifndef __HAVE_ARCH_PTEP_CLEAR_YOUNG_FLUSH --- -2.17.1 - diff --git a/target/linux/generic/backport-6.0/102-mm-vmscan.c-refactor-shrink_node.patch b/target/linux/generic/backport-6.0/102-mm-vmscan.c-refactor-shrink_node.patch index 8f0421913..f7c39744b 100644 --- a/target/linux/generic/backport-6.0/102-mm-vmscan.c-refactor-shrink_node.patch +++ b/target/linux/generic/backport-6.0/102-mm-vmscan.c-refactor-shrink_node.patch @@ -29,8 +29,6 @@ Change-Id: Iae734b5b4030205b7db6e8c841f747b6f6ae1a04 mm/vmscan.c | 198 +++++++++++++++++++++++++++------------------------- 1 file changed, 104 insertions(+), 94 deletions(-) -diff --git a/mm/vmscan.c b/mm/vmscan.c -index 382dbe97329f..4e4331367db9 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -2728,6 +2728,109 @@ enum scan_balance { @@ -143,7 +141,7 @@ index 382dbe97329f..4e4331367db9 100644 /* * Determine how aggressively the anon and file LRU lists should be * scanned. -@@ -3197,109 +3300,16 @@ static void shrink_node(pg_data_t *pgdat, struct scan_control *sc) +@@ -3197,109 +3300,16 @@ static void shrink_node(pg_data_t *pgdat unsigned long nr_reclaimed, nr_scanned; struct lruvec *target_lruvec; bool reclaimable = false; @@ -254,6 +252,3 @@ index 382dbe97329f..4e4331367db9 100644 shrink_node_memcgs(pgdat, sc); --- -2.17.1 - diff --git a/target/linux/generic/backport-6.0/103-Revert-include-linux-mm_inline.h-fold-__update_lru_s.patch b/target/linux/generic/backport-6.0/103-Revert-include-linux-mm_inline.h-fold-__update_lru_s.patch index a681237a1..2a6a1f24f 100644 --- a/target/linux/generic/backport-6.0/103-Revert-include-linux-mm_inline.h-fold-__update_lru_s.patch +++ b/target/linux/generic/backport-6.0/103-Revert-include-linux-mm_inline.h-fold-__update_lru_s.patch @@ -32,11 +32,9 @@ Change-Id: I6155c407d50199a43b179c7f45904d4b7c052118 include/linux/mm_inline.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) -diff --git a/include/linux/mm_inline.h b/include/linux/mm_inline.h -index 7b25b53c474a..fb8aadb81cd6 100644 --- a/include/linux/mm_inline.h +++ b/include/linux/mm_inline.h -@@ -34,7 +34,7 @@ static inline int page_is_file_lru(struct page *page) +@@ -34,7 +34,7 @@ static inline int page_is_file_lru(struc return folio_is_file_lru(page_folio(page)); } @@ -45,7 +43,7 @@ index 7b25b53c474a..fb8aadb81cd6 100644 enum lru_list lru, enum zone_type zid, long nr_pages) { -@@ -43,6 +43,13 @@ static __always_inline void update_lru_size(struct lruvec *lruvec, +@@ -43,6 +43,13 @@ static __always_inline void update_lru_s __mod_lruvec_state(lruvec, NR_LRU_BASE + lru, nr_pages); __mod_zone_page_state(&pgdat->node_zones[zid], NR_ZONE_LRU_BASE + lru, nr_pages); @@ -59,6 +57,3 @@ index 7b25b53c474a..fb8aadb81cd6 100644 #ifdef CONFIG_MEMCG mem_cgroup_update_lru_size(lruvec, lru, zid, nr_pages); #endif --- -2.17.1 - diff --git a/target/linux/generic/backport-6.0/104-mm-multi-gen-LRU-groundwork.patch b/target/linux/generic/backport-6.0/104-mm-multi-gen-LRU-groundwork.patch index cc3b3ba1b..4750bdd99 100644 --- a/target/linux/generic/backport-6.0/104-mm-multi-gen-LRU-groundwork.patch +++ b/target/linux/generic/backport-6.0/104-mm-multi-gen-LRU-groundwork.patch @@ -100,11 +100,9 @@ Change-Id: I71de7cd15b8dfa6f9fdd838023474693c4fee0a7 mm/vmscan.c | 75 +++++++++++++ 15 files changed, 424 insertions(+), 14 deletions(-) -diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c -index 51897427a534..b4a6e0a1b945 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c -@@ -776,7 +776,8 @@ static int fuse_check_page(struct page *page) +@@ -776,7 +776,8 @@ static int fuse_check_page(struct page * 1 << PG_active | 1 << PG_workingset | 1 << PG_reclaim | @@ -114,11 +112,9 @@ index 51897427a534..b4a6e0a1b945 100644 dump_page(page, "fuse: trying to steal weird page"); return 1; } -diff --git a/include/linux/mm_inline.h b/include/linux/mm_inline.h -index fb8aadb81cd6..2ff703900fd0 100644 --- a/include/linux/mm_inline.h +++ b/include/linux/mm_inline.h -@@ -40,6 +40,9 @@ static __always_inline void __update_lru_size(struct lruvec *lruvec, +@@ -40,6 +40,9 @@ static __always_inline void __update_lru { struct pglist_data *pgdat = lruvec_pgdat(lruvec); @@ -128,7 +124,7 @@ index fb8aadb81cd6..2ff703900fd0 100644 __mod_lruvec_state(lruvec, NR_LRU_BASE + lru, nr_pages); __mod_zone_page_state(&pgdat->node_zones[zid], NR_ZONE_LRU_BASE + lru, nr_pages); -@@ -101,11 +104,177 @@ static __always_inline enum lru_list folio_lru_list(struct folio *folio) +@@ -101,11 +104,177 @@ static __always_inline enum lru_list fol return lru; } @@ -306,7 +302,7 @@ index fb8aadb81cd6..2ff703900fd0 100644 update_lru_size(lruvec, lru, folio_zonenum(folio), folio_nr_pages(folio)); if (lru != LRU_UNEVICTABLE) -@@ -123,6 +292,9 @@ void lruvec_add_folio_tail(struct lruvec *lruvec, struct folio *folio) +@@ -123,6 +292,9 @@ void lruvec_add_folio_tail(struct lruvec { enum lru_list lru = folio_lru_list(folio); @@ -316,7 +312,7 @@ index fb8aadb81cd6..2ff703900fd0 100644 update_lru_size(lruvec, lru, folio_zonenum(folio), folio_nr_pages(folio)); /* This is not expected to be used on LRU_UNEVICTABLE */ -@@ -140,6 +312,9 @@ void lruvec_del_folio(struct lruvec *lruvec, struct folio *folio) +@@ -140,6 +312,9 @@ void lruvec_del_folio(struct lruvec *lru { enum lru_list lru = folio_lru_list(folio); @@ -326,8 +322,6 @@ index fb8aadb81cd6..2ff703900fd0 100644 if (lru != LRU_UNEVICTABLE) list_del(&folio->lru); update_lru_size(lruvec, lru, folio_zonenum(folio), -diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h -index e24b40c52468..1abb6d38ed86 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -314,6 +314,102 @@ enum lruvec_flags { @@ -444,7 +438,7 @@ index e24b40c52468..1abb6d38ed86 100644 #ifdef CONFIG_MEMCG struct pglist_data *pgdat; #endif -@@ -746,6 +846,8 @@ static inline bool zone_is_empty(struct zone *zone) +@@ -746,6 +846,8 @@ static inline bool zone_is_empty(struct #define ZONES_PGOFF (NODES_PGOFF - ZONES_WIDTH) #define LAST_CPUPID_PGOFF (ZONES_PGOFF - LAST_CPUPID_WIDTH) #define KASAN_TAG_PGOFF (LAST_CPUPID_PGOFF - KASAN_TAG_WIDTH) @@ -453,8 +447,6 @@ index e24b40c52468..1abb6d38ed86 100644 /* * Define the bit shifts to access each section. For non-existent -diff --git a/include/linux/page-flags-layout.h b/include/linux/page-flags-layout.h -index ef1e3e736e14..240905407a18 100644 --- a/include/linux/page-flags-layout.h +++ b/include/linux/page-flags-layout.h @@ -55,7 +55,8 @@ @@ -493,11 +485,9 @@ index ef1e3e736e14..240905407a18 100644 + #endif #endif /* _LINUX_PAGE_FLAGS_LAYOUT */ -diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h -index 465ff35a8c00..0b0ae5084e60 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h -@@ -1058,7 +1058,7 @@ static __always_inline void __ClearPageAnonExclusive(struct page *page) +@@ -1058,7 +1058,7 @@ static __always_inline void __ClearPageA 1UL << PG_private | 1UL << PG_private_2 | \ 1UL << PG_writeback | 1UL << PG_reserved | \ 1UL << PG_slab | 1UL << PG_active | \ @@ -506,7 +496,7 @@ index 465ff35a8c00..0b0ae5084e60 100644 /* * Flags checked when a page is prepped for return by the page allocator. -@@ -1069,7 +1069,7 @@ static __always_inline void __ClearPageAnonExclusive(struct page *page) +@@ -1069,7 +1069,7 @@ static __always_inline void __ClearPageA * alloc-free cycle to prevent from reusing the page. */ #define PAGE_FLAGS_CHECK_AT_PREP \ @@ -515,8 +505,6 @@ index 465ff35a8c00..0b0ae5084e60 100644 #define PAGE_FLAGS_PRIVATE \ (1UL << PG_private | 1UL << PG_private_2) -diff --git a/include/linux/sched.h b/include/linux/sched.h -index e7b2f8a5c711..8cc46a789193 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -914,6 +914,10 @@ struct task_struct { @@ -530,8 +518,6 @@ index e7b2f8a5c711..8cc46a789193 100644 #ifdef CONFIG_COMPAT_BRK unsigned brk_randomized:1; #endif -diff --git a/kernel/bounds.c b/kernel/bounds.c -index 9795d75b09b2..5ee60777d8e4 100644 --- a/kernel/bounds.c +++ b/kernel/bounds.c @@ -22,6 +22,11 @@ int main(void) @@ -546,8 +532,6 @@ index 9795d75b09b2..5ee60777d8e4 100644 /* End of constants */ return 0; -diff --git a/mm/Kconfig b/mm/Kconfig -index 0331f1461f81..d95f07cd6dcf 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -1124,6 +1124,14 @@ config PTE_MARKER_UFFD_WP @@ -565,11 +549,9 @@ index 0331f1461f81..d95f07cd6dcf 100644 source "mm/damon/Kconfig" endmenu -diff --git a/mm/huge_memory.c b/mm/huge_memory.c -index f42bb51e023a..79e0b08b4cf9 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c -@@ -2438,7 +2438,8 @@ static void __split_huge_page_tail(struct page *head, int tail, +@@ -2438,7 +2438,8 @@ static void __split_huge_page_tail(struc #ifdef CONFIG_64BIT (1L << PG_arch_2) | #endif @@ -579,11 +561,9 @@ index f42bb51e023a..79e0b08b4cf9 100644 /* ->mapping in first tail page is compound_mapcount */ VM_BUG_ON_PAGE(tail > 2 && page_tail->mapping != TAIL_MAPPING, -diff --git a/mm/memcontrol.c b/mm/memcontrol.c -index b69979c9ced5..5fd38d12149c 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c -@@ -5170,6 +5170,7 @@ static void __mem_cgroup_free(struct mem_cgroup *memcg) +@@ -5170,6 +5170,7 @@ static void __mem_cgroup_free(struct mem static void mem_cgroup_free(struct mem_cgroup *memcg) { @@ -591,7 +571,7 @@ index b69979c9ced5..5fd38d12149c 100644 memcg_wb_domain_exit(memcg); __mem_cgroup_free(memcg); } -@@ -5228,6 +5229,7 @@ static struct mem_cgroup *mem_cgroup_alloc(void) +@@ -5228,6 +5229,7 @@ static struct mem_cgroup *mem_cgroup_all memcg->deferred_split_queue.split_queue_len = 0; #endif idr_replace(&mem_cgroup_idr, memcg, memcg->id.id); @@ -599,11 +579,9 @@ index b69979c9ced5..5fd38d12149c 100644 return memcg; fail: mem_cgroup_id_remove(memcg); -diff --git a/mm/memory.c b/mm/memory.c -index 68294ce1cb06..cd1b5bfd9f3e 100644 --- a/mm/memory.c +++ b/mm/memory.c -@@ -5108,6 +5108,27 @@ static inline void mm_account_fault(struct pt_regs *regs, +@@ -5110,6 +5110,27 @@ static inline void mm_account_fault(stru perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, regs, address); } @@ -631,7 +609,7 @@ index 68294ce1cb06..cd1b5bfd9f3e 100644 /* * By the time we get here, we already hold the mm semaphore * -@@ -5139,11 +5160,15 @@ vm_fault_t handle_mm_fault(struct vm_area_struct *vma, unsigned long address, +@@ -5141,11 +5162,15 @@ vm_fault_t handle_mm_fault(struct vm_are if (flags & FAULT_FLAG_USER) mem_cgroup_enter_user_fault(); @@ -647,11 +625,9 @@ index 68294ce1cb06..cd1b5bfd9f3e 100644 if (flags & FAULT_FLAG_USER) { mem_cgroup_exit_user_fault(); /* -diff --git a/mm/mm_init.c b/mm/mm_init.c -index 9ddaf0e1b0ab..0d7b2bd2454a 100644 --- a/mm/mm_init.c +++ b/mm/mm_init.c -@@ -65,14 +65,16 @@ void __init mminit_verify_pageflags_layout(void) +@@ -65,14 +65,16 @@ void __init mminit_verify_pageflags_layo shift = 8 * sizeof(unsigned long); width = shift - SECTIONS_WIDTH - NODES_WIDTH - ZONES_WIDTH @@ -670,8 +646,6 @@ index 9ddaf0e1b0ab..0d7b2bd2454a 100644 NR_PAGEFLAGS); mminit_dprintk(MMINIT_TRACE, "pageflags_layout_shifts", "Section %d Node %d Zone %d Lastcpupid %d Kasantag %d\n", -diff --git a/mm/mmzone.c b/mm/mmzone.c -index 0ae7571e35ab..68e1511be12d 100644 --- a/mm/mmzone.c +++ b/mm/mmzone.c @@ -88,6 +88,8 @@ void lruvec_init(struct lruvec *lruvec) @@ -683,8 +657,6 @@ index 0ae7571e35ab..68e1511be12d 100644 } #if defined(CONFIG_NUMA_BALANCING) && !defined(LAST_CPUPID_NOT_IN_PAGE_FLAGS) -diff --git a/mm/swap.c b/mm/swap.c -index 9cee7f6a3809..0e423b7d458b 100644 --- a/mm/swap.c +++ b/mm/swap.c @@ -484,6 +484,11 @@ void folio_add_lru(struct folio *folio) @@ -699,7 +671,7 @@ index 9cee7f6a3809..0e423b7d458b 100644 folio_get(folio); local_lock(&cpu_fbatches.lock); fbatch = this_cpu_ptr(&cpu_fbatches.lru_add); -@@ -575,7 +580,7 @@ static void lru_deactivate_file_fn(struct lruvec *lruvec, struct folio *folio) +@@ -575,7 +580,7 @@ static void lru_deactivate_file_fn(struc static void lru_deactivate_fn(struct lruvec *lruvec, struct folio *folio) { @@ -719,11 +691,9 @@ index 9cee7f6a3809..0e423b7d458b 100644 struct folio_batch *fbatch; folio_get(folio); -diff --git a/mm/vmscan.c b/mm/vmscan.c -index 4e4331367db9..fb76cfe2fdc2 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c -@@ -3050,6 +3050,81 @@ static bool can_age_anon_pages(struct pglist_data *pgdat, +@@ -3050,6 +3050,81 @@ static bool can_age_anon_pages(struct pg return can_demote(pgdat->node_id, sc); } @@ -805,6 +775,3 @@ index 4e4331367db9..fb76cfe2fdc2 100644 static void shrink_lruvec(struct lruvec *lruvec, struct scan_control *sc) { unsigned long nr[NR_LRU_LISTS]; --- -2.17.1 - diff --git a/target/linux/generic/backport-6.0/105-mm-multi-gen-LRU-minimal-implementation.patch b/target/linux/generic/backport-6.0/105-mm-multi-gen-LRU-minimal-implementation.patch index 9dd95c74b..0952c9704 100644 --- a/target/linux/generic/backport-6.0/105-mm-multi-gen-LRU-minimal-implementation.patch +++ b/target/linux/generic/backport-6.0/105-mm-multi-gen-LRU-minimal-implementation.patch @@ -186,11 +186,9 @@ Change-Id: Id47465f46f1f77f1e9f0be3972e380ddcfa37cc0 mm/workingset.c | 110 ++++- 8 files changed, 1025 insertions(+), 11 deletions(-) -diff --git a/include/linux/mm_inline.h b/include/linux/mm_inline.h -index 2ff703900fd0..f2b2296a42f9 100644 --- a/include/linux/mm_inline.h +++ b/include/linux/mm_inline.h -@@ -121,6 +121,33 @@ static inline int lru_gen_from_seq(unsigned long seq) +@@ -121,6 +121,33 @@ static inline int lru_gen_from_seq(unsig return seq % MAX_NR_GENS; } @@ -224,7 +222,7 @@ index 2ff703900fd0..f2b2296a42f9 100644 static inline int folio_lru_gen(struct folio *folio) { unsigned long flags = READ_ONCE(folio->flags); -@@ -173,6 +200,15 @@ static inline void lru_gen_update_size(struct lruvec *lruvec, struct folio *foli +@@ -173,6 +200,15 @@ static inline void lru_gen_update_size(s __update_lru_size(lruvec, lru, zone, -delta); return; } @@ -240,8 +238,6 @@ index 2ff703900fd0..f2b2296a42f9 100644 } static inline bool lru_gen_add_folio(struct lruvec *lruvec, struct folio *folio, bool reclaiming) -diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h -index 1abb6d38ed86..07bd22149c22 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -347,6 +347,28 @@ enum lruvec_flags { @@ -306,8 +302,6 @@ index 1abb6d38ed86..07bd22149c22 100644 }; void lru_gen_init_lruvec(struct lruvec *lruvec); -diff --git a/include/linux/page-flags-layout.h b/include/linux/page-flags-layout.h -index 240905407a18..7d79818dc065 100644 --- a/include/linux/page-flags-layout.h +++ b/include/linux/page-flags-layout.h @@ -106,7 +106,10 @@ @@ -322,8 +316,6 @@ index 240905407a18..7d79818dc065 100644 #endif #endif /* _LINUX_PAGE_FLAGS_LAYOUT */ -diff --git a/kernel/bounds.c b/kernel/bounds.c -index 5ee60777d8e4..b529182e8b04 100644 --- a/kernel/bounds.c +++ b/kernel/bounds.c @@ -24,8 +24,10 @@ int main(void) @@ -337,8 +329,6 @@ index 5ee60777d8e4..b529182e8b04 100644 #endif /* End of constants */ -diff --git a/mm/Kconfig b/mm/Kconfig -index d95f07cd6dcf..5101dca8f21c 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -1124,6 +1124,7 @@ config PTE_MARKER_UFFD_WP @@ -366,11 +356,9 @@ index d95f07cd6dcf..5101dca8f21c 100644 source "mm/damon/Kconfig" endmenu -diff --git a/mm/swap.c b/mm/swap.c -index 0e423b7d458b..f74fd51fa9e1 100644 --- a/mm/swap.c +++ b/mm/swap.c -@@ -428,6 +428,40 @@ static void __lru_cache_activate_folio(struct folio *folio) +@@ -428,6 +428,40 @@ static void __lru_cache_activate_folio(s local_unlock(&cpu_fbatches.lock); } @@ -411,7 +399,7 @@ index 0e423b7d458b..f74fd51fa9e1 100644 /* * Mark a page as having seen activity. * -@@ -440,6 +474,11 @@ static void __lru_cache_activate_folio(struct folio *folio) +@@ -440,6 +474,11 @@ static void __lru_cache_activate_folio(s */ void folio_mark_accessed(struct folio *folio) { @@ -423,11 +411,9 @@ index 0e423b7d458b..f74fd51fa9e1 100644 if (!folio_test_referenced(folio)) { folio_set_referenced(folio); } else if (folio_test_unevictable(folio)) { -diff --git a/mm/vmscan.c b/mm/vmscan.c -index fb76cfe2fdc2..8e63f95a5f53 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c -@@ -1334,9 +1334,11 @@ static int __remove_mapping(struct address_space *mapping, struct folio *folio, +@@ -1334,9 +1334,11 @@ static int __remove_mapping(struct addre if (folio_test_swapcache(folio)) { swp_entry_t swap = folio_swap_entry(folio); @@ -440,7 +426,7 @@ index fb76cfe2fdc2..8e63f95a5f53 100644 __delete_from_swap_cache(folio, swap, shadow); xa_unlock_irq(&mapping->i_pages); put_swap_page(&folio->page, swap); -@@ -2733,6 +2735,9 @@ static void prepare_scan_count(pg_data_t *pgdat, struct scan_control *sc) +@@ -2733,6 +2735,9 @@ static void prepare_scan_count(pg_data_t unsigned long file; struct lruvec *target_lruvec; @@ -450,7 +436,7 @@ index fb76cfe2fdc2..8e63f95a5f53 100644 target_lruvec = mem_cgroup_lruvec(sc->target_mem_cgroup, pgdat); /* -@@ -3056,6 +3061,17 @@ static bool can_age_anon_pages(struct pglist_data *pgdat, +@@ -3056,6 +3061,17 @@ static bool can_age_anon_pages(struct pg * shorthand helpers ******************************************************************************/ @@ -468,7 +454,7 @@ index fb76cfe2fdc2..8e63f95a5f53 100644 #define for_each_gen_type_zone(gen, type, zone) \ for ((gen) = 0; (gen) < MAX_NR_GENS; (gen)++) \ for ((type) = 0; (type) < ANON_AND_FILE; (type)++) \ -@@ -3081,6 +3097,745 @@ static struct lruvec __maybe_unused *get_lruvec(struct mem_cgroup *memcg, int ni +@@ -3081,6 +3097,745 @@ static struct lruvec __maybe_unused *get return pgdat ? &pgdat->__lruvec : NULL; } @@ -1231,7 +1217,7 @@ index fb76cfe2fdc2..8e63f95a5f53 100644 #endif /* CONFIG_LRU_GEN */ static void shrink_lruvec(struct lruvec *lruvec, struct scan_control *sc) -@@ -3136,6 +3901,11 @@ static void shrink_lruvec(struct lruvec *lruvec, struct scan_control *sc) +@@ -3136,6 +3901,11 @@ static void shrink_lruvec(struct lruvec struct blk_plug plug; bool scan_adjusted; @@ -1243,7 +1229,7 @@ index fb76cfe2fdc2..8e63f95a5f53 100644 get_scan_count(lruvec, sc, nr); /* Record the original scan target for proportional adjustments later */ -@@ -3642,6 +4412,9 @@ static void snapshot_refaults(struct mem_cgroup *target_memcg, pg_data_t *pgdat) +@@ -3642,6 +4412,9 @@ static void snapshot_refaults(struct mem struct lruvec *target_lruvec; unsigned long refaults; @@ -1253,7 +1239,7 @@ index fb76cfe2fdc2..8e63f95a5f53 100644 target_lruvec = mem_cgroup_lruvec(target_memcg, pgdat); refaults = lruvec_page_state(target_lruvec, WORKINGSET_ACTIVATE_ANON); target_lruvec->refaults[0] = refaults; -@@ -4008,12 +4781,16 @@ unsigned long try_to_free_mem_cgroup_pages(struct mem_cgroup *memcg, +@@ -4008,12 +4781,16 @@ unsigned long try_to_free_mem_cgroup_pag } #endif @@ -1272,7 +1258,7 @@ index fb76cfe2fdc2..8e63f95a5f53 100644 if (!can_age_anon_pages(pgdat, sc)) return; -@@ -4333,12 +5110,11 @@ static int balance_pgdat(pg_data_t *pgdat, int order, int highest_zoneidx) +@@ -4333,12 +5110,11 @@ restart: sc.may_swap = !nr_boost_reclaim; /* @@ -1289,11 +1275,9 @@ index fb76cfe2fdc2..8e63f95a5f53 100644 /* * If we're getting trouble reclaiming, start doing writepage -diff --git a/mm/workingset.c b/mm/workingset.c -index a5e84862fc86..ae7e984b23c6 100644 --- a/mm/workingset.c +++ b/mm/workingset.c -@@ -187,7 +187,6 @@ static unsigned int bucket_order __read_mostly; +@@ -187,7 +187,6 @@ static unsigned int bucket_order __read_ static void *pack_shadow(int memcgid, pg_data_t *pgdat, unsigned long eviction, bool workingset) { @@ -1301,7 +1285,7 @@ index a5e84862fc86..ae7e984b23c6 100644 eviction &= EVICTION_MASK; eviction = (eviction << MEM_CGROUP_ID_SHIFT) | memcgid; eviction = (eviction << NODES_SHIFT) | pgdat->node_id; -@@ -212,10 +211,107 @@ static void unpack_shadow(void *shadow, int *memcgidp, pg_data_t **pgdat, +@@ -212,10 +211,107 @@ static void unpack_shadow(void *shadow, *memcgidp = memcgid; *pgdat = NODE_DATA(nid); @@ -1410,7 +1394,7 @@ index a5e84862fc86..ae7e984b23c6 100644 /** * workingset_age_nonresident - age non-resident entries as LRU ages * @lruvec: the lruvec that was aged -@@ -264,10 +360,14 @@ void *workingset_eviction(struct folio *folio, struct mem_cgroup *target_memcg) +@@ -264,10 +360,14 @@ void *workingset_eviction(struct folio * VM_BUG_ON_FOLIO(folio_ref_count(folio), folio); VM_BUG_ON_FOLIO(!folio_test_locked(folio), folio); @@ -1425,7 +1409,7 @@ index a5e84862fc86..ae7e984b23c6 100644 workingset_age_nonresident(lruvec, folio_nr_pages(folio)); return pack_shadow(memcgid, pgdat, eviction, folio_test_workingset(folio)); -@@ -298,7 +398,13 @@ void workingset_refault(struct folio *folio, void *shadow) +@@ -298,7 +398,13 @@ void workingset_refault(struct folio *fo int memcgid; long nr; @@ -1439,6 +1423,3 @@ index a5e84862fc86..ae7e984b23c6 100644 rcu_read_lock(); /* --- -2.17.1 - diff --git a/target/linux/generic/backport-6.0/106-mm-multi-gen-LRU-exploit-locality-in-rmap.patch b/target/linux/generic/backport-6.0/106-mm-multi-gen-LRU-exploit-locality-in-rmap.patch index 5f08a63fb..729db5afa 100644 --- a/target/linux/generic/backport-6.0/106-mm-multi-gen-LRU-exploit-locality-in-rmap.patch +++ b/target/linux/generic/backport-6.0/106-mm-multi-gen-LRU-exploit-locality-in-rmap.patch @@ -87,11 +87,9 @@ Change-Id: I4b9ca0fd20f566ce554e703f14cee3fe0048c2fd mm/vmscan.c | 184 +++++++++++++++++++++++++++++++++++++ 8 files changed, 236 insertions(+), 2 deletions(-) -diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h -index 567f12323f55..d2b7f6b9998c 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h -@@ -444,6 +444,7 @@ static inline struct obj_cgroup *__folio_objcg(struct folio *folio) +@@ -444,6 +444,7 @@ static inline struct obj_cgroup *__folio * - LRU isolation * - lock_page_memcg() * - exclusive reference @@ -99,7 +97,7 @@ index 567f12323f55..d2b7f6b9998c 100644 * * For a kmem folio a caller should hold an rcu read lock to protect memcg * associated with a kmem folio from being released. -@@ -505,6 +506,7 @@ static inline struct mem_cgroup *folio_memcg_rcu(struct folio *folio) +@@ -505,6 +506,7 @@ static inline struct mem_cgroup *folio_m * - LRU isolation * - lock_page_memcg() * - exclusive reference @@ -107,7 +105,7 @@ index 567f12323f55..d2b7f6b9998c 100644 * * For a kmem page a caller should hold an rcu read lock to protect memcg * associated with a kmem page from being released. -@@ -959,6 +961,23 @@ void unlock_page_memcg(struct page *page); +@@ -959,6 +961,23 @@ void unlock_page_memcg(struct page *page void __mod_memcg_state(struct mem_cgroup *memcg, int idx, int val); @@ -131,7 +129,7 @@ index 567f12323f55..d2b7f6b9998c 100644 /* idx can be of type enum memcg_stat_item or node_stat_item */ static inline void mod_memcg_state(struct mem_cgroup *memcg, int idx, int val) -@@ -1433,6 +1452,18 @@ static inline void folio_memcg_unlock(struct folio *folio) +@@ -1433,6 +1452,18 @@ static inline void folio_memcg_unlock(st { } @@ -150,11 +148,9 @@ index 567f12323f55..d2b7f6b9998c 100644 static inline void mem_cgroup_handle_over_high(void) { } -diff --git a/include/linux/mm.h b/include/linux/mm.h -index 21f8b27bd9fd..88976a521ef5 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h -@@ -1465,6 +1465,11 @@ static inline unsigned long folio_pfn(struct folio *folio) +@@ -1465,6 +1465,11 @@ static inline unsigned long folio_pfn(st return page_to_pfn(&folio->page); } @@ -166,8 +162,6 @@ index 21f8b27bd9fd..88976a521ef5 100644 static inline atomic_t *folio_pincount_ptr(struct folio *folio) { return &folio_page(folio, 1)->compound_pincount; -diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h -index 07bd22149c22..2b4dc60d0f6c 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -372,6 +372,7 @@ enum lruvec_flags { @@ -186,7 +180,7 @@ index 07bd22149c22..2b4dc60d0f6c 100644 #ifdef CONFIG_MEMCG void lru_gen_init_memcg(struct mem_cgroup *memcg); -@@ -439,6 +441,10 @@ static inline void lru_gen_init_lruvec(struct lruvec *lruvec) +@@ -439,6 +441,10 @@ static inline void lru_gen_init_lruvec(s { } @@ -197,11 +191,9 @@ index 07bd22149c22..2b4dc60d0f6c 100644 #ifdef CONFIG_MEMCG static inline void lru_gen_init_memcg(struct mem_cgroup *memcg) { -diff --git a/mm/internal.h b/mm/internal.h -index 785409805ed7..a1fddea6b34f 100644 --- a/mm/internal.h +++ b/mm/internal.h -@@ -83,6 +83,7 @@ vm_fault_t do_swap_page(struct vm_fault *vmf); +@@ -83,6 +83,7 @@ vm_fault_t do_swap_page(struct vm_fault void folio_rotate_reclaimable(struct folio *folio); bool __folio_end_writeback(struct folio *folio); void deactivate_file_folio(struct folio *folio); @@ -209,11 +201,9 @@ index 785409805ed7..a1fddea6b34f 100644 void free_pgtables(struct mmu_gather *tlb, struct vm_area_struct *start_vma, unsigned long floor, unsigned long ceiling); -diff --git a/mm/memcontrol.c b/mm/memcontrol.c -index 5fd38d12149c..882180866e31 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c -@@ -2789,6 +2789,7 @@ static void commit_charge(struct folio *folio, struct mem_cgroup *memcg) +@@ -2789,6 +2789,7 @@ static void commit_charge(struct folio * * - LRU isolation * - lock_page_memcg() * - exclusive reference @@ -221,11 +211,9 @@ index 5fd38d12149c..882180866e31 100644 */ folio->memcg_data = (unsigned long)memcg; } -diff --git a/mm/rmap.c b/mm/rmap.c -index 93d5a6f793d2..9e0ce48bca08 100644 --- a/mm/rmap.c +++ b/mm/rmap.c -@@ -833,6 +833,12 @@ static bool folio_referenced_one(struct folio *folio, +@@ -833,6 +833,12 @@ static bool folio_referenced_one(struct } if (pvmw.pte) { @@ -238,11 +226,9 @@ index 93d5a6f793d2..9e0ce48bca08 100644 if (ptep_clear_flush_young_notify(vma, address, pvmw.pte)) { /* -diff --git a/mm/swap.c b/mm/swap.c -index f74fd51fa9e1..0a3871a70952 100644 --- a/mm/swap.c +++ b/mm/swap.c -@@ -366,7 +366,7 @@ static void folio_activate_drain(int cpu) +@@ -366,7 +366,7 @@ static void folio_activate_drain(int cpu folio_batch_move_lru(fbatch, folio_activate_fn); } @@ -251,7 +237,7 @@ index f74fd51fa9e1..0a3871a70952 100644 { if (folio_test_lru(folio) && !folio_test_active(folio) && !folio_test_unevictable(folio)) { -@@ -385,7 +385,7 @@ static inline void folio_activate_drain(int cpu) +@@ -385,7 +385,7 @@ static inline void folio_activate_drain( { } @@ -260,11 +246,9 @@ index f74fd51fa9e1..0a3871a70952 100644 { struct lruvec *lruvec; -diff --git a/mm/vmscan.c b/mm/vmscan.c -index 8e63f95a5f53..8686918e238d 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c -@@ -1635,6 +1635,11 @@ static unsigned int shrink_page_list(struct list_head *page_list, +@@ -1635,6 +1635,11 @@ retry: if (!sc->may_unmap && folio_mapped(folio)) goto keep_locked; @@ -276,7 +260,7 @@ index 8e63f95a5f53..8686918e238d 100644 /* * The number of dirty pages determines if a node is marked * reclaim_congested. kswapd will stall and start writing -@@ -3219,6 +3224,29 @@ static bool positive_ctrl_err(struct ctrl_pos *sp, struct ctrl_pos *pv) +@@ -3219,6 +3224,29 @@ static bool positive_ctrl_err(struct ctr * the aging ******************************************************************************/ @@ -306,7 +290,7 @@ index 8e63f95a5f53..8686918e238d 100644 /* protect pages accessed multiple times through file descriptors */ static int folio_inc_gen(struct lruvec *lruvec, struct folio *folio, bool reclaiming) { -@@ -3230,6 +3258,11 @@ static int folio_inc_gen(struct lruvec *lruvec, struct folio *folio, bool reclai +@@ -3230,6 +3258,11 @@ static int folio_inc_gen(struct lruvec * VM_WARN_ON_ONCE_FOLIO(!(old_flags & LRU_GEN_MASK), folio); do { @@ -318,7 +302,7 @@ index 8e63f95a5f53..8686918e238d 100644 new_gen = (old_gen + 1) % MAX_NR_GENS; new_flags = old_flags & ~(LRU_GEN_MASK | LRU_REFS_MASK | LRU_REFS_FLAGS); -@@ -3244,6 +3277,43 @@ static int folio_inc_gen(struct lruvec *lruvec, struct folio *folio, bool reclai +@@ -3244,6 +3277,43 @@ static int folio_inc_gen(struct lruvec * return new_gen; } @@ -362,7 +346,7 @@ index 8e63f95a5f53..8686918e238d 100644 static void inc_min_seq(struct lruvec *lruvec, int type) { struct lru_gen_struct *lrugen = &lruvec->lrugen; -@@ -3443,6 +3513,114 @@ static void lru_gen_age_node(struct pglist_data *pgdat, struct scan_control *sc) +@@ -3443,6 +3513,114 @@ static void lru_gen_age_node(struct pgli } while ((memcg = mem_cgroup_iter(NULL, memcg, NULL))); } @@ -477,7 +461,7 @@ index 8e63f95a5f53..8686918e238d 100644 /****************************************************************************** * the eviction ******************************************************************************/ -@@ -3479,6 +3657,12 @@ static bool sort_folio(struct lruvec *lruvec, struct folio *folio, int tier_idx) +@@ -3479,6 +3657,12 @@ static bool sort_folio(struct lruvec *lr return true; } @@ -490,6 +474,3 @@ index 8e63f95a5f53..8686918e238d 100644 /* protected */ if (tier > tier_idx) { int hist = lru_hist_from_seq(lrugen->min_seq[type]); --- -2.17.1 - diff --git a/target/linux/generic/backport-6.0/107-mm-multi-gen-LRU-support-page-table-walks.patch b/target/linux/generic/backport-6.0/107-mm-multi-gen-LRU-support-page-table-walks.patch index 5b2a93b95..de8109ca5 100644 --- a/target/linux/generic/backport-6.0/107-mm-multi-gen-LRU-support-page-table-walks.patch +++ b/target/linux/generic/backport-6.0/107-mm-multi-gen-LRU-support-page-table-walks.patch @@ -124,11 +124,9 @@ Change-Id: I1065451af34154306418510c19e03ea798dc13af mm/vmscan.c | 1008 +++++++++++++++++++++++++++++++++++- 10 files changed, 1170 insertions(+), 17 deletions(-) -diff --git a/fs/exec.c b/fs/exec.c -index d046dbb9cbd0..c67b12f0f577 100644 --- a/fs/exec.c +++ b/fs/exec.c -@@ -1011,6 +1011,7 @@ static int exec_mmap(struct mm_struct *mm) +@@ -1011,6 +1011,7 @@ static int exec_mmap(struct mm_struct *m active_mm = tsk->active_mm; tsk->active_mm = mm; tsk->mm = mm; @@ -136,7 +134,7 @@ index d046dbb9cbd0..c67b12f0f577 100644 /* * This prevents preemption while active_mm is being loaded and * it and mm are being updated, which could cause problems for -@@ -1026,6 +1027,7 @@ static int exec_mmap(struct mm_struct *mm) +@@ -1026,6 +1027,7 @@ static int exec_mmap(struct mm_struct *m tsk->mm->vmacache_seqnum = 0; vmacache_flush(tsk); task_unlock(tsk); @@ -144,8 +142,6 @@ index d046dbb9cbd0..c67b12f0f577 100644 if (old_mm) { mmap_read_unlock(old_mm); BUG_ON(active_mm != old_mm); -diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h -index d2b7f6b9998c..877cbcbc6ed9 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h @@ -350,6 +350,11 @@ struct mem_cgroup { @@ -160,8 +156,6 @@ index d2b7f6b9998c..877cbcbc6ed9 100644 struct mem_cgroup_per_node *nodeinfo[]; }; -diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h -index cf97f3884fda..e1797813cc2c 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h @@ -672,6 +672,22 @@ struct mm_struct { @@ -187,7 +181,7 @@ index cf97f3884fda..e1797813cc2c 100644 } __randomize_layout; /* -@@ -698,6 +714,66 @@ static inline cpumask_t *mm_cpumask(struct mm_struct *mm) +@@ -698,6 +714,66 @@ static inline cpumask_t *mm_cpumask(stru return (struct cpumask *)&mm->cpu_bitmap; } @@ -254,8 +248,6 @@ index cf97f3884fda..e1797813cc2c 100644 struct mmu_gather; extern void tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm); extern void tlb_gather_mmu_fullmm(struct mmu_gather *tlb, struct mm_struct *mm); -diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h -index 2b4dc60d0f6c..e5cf37dc41a4 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -405,7 +405,7 @@ enum { @@ -342,8 +334,6 @@ index 2b4dc60d0f6c..e5cf37dc41a4 100644 ZONE_PADDING(_pad2_) /* Per-node vmstats */ -diff --git a/include/linux/swap.h b/include/linux/swap.h -index 43150b9bbc5c..6308150b234a 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h @@ -162,6 +162,10 @@ union swap_header { @@ -357,11 +347,9 @@ index 43150b9bbc5c..6308150b234a 100644 }; #ifdef __KERNEL__ -diff --git a/kernel/exit.c b/kernel/exit.c -index 84021b24f79e..98a33bd7c25c 100644 --- a/kernel/exit.c +++ b/kernel/exit.c -@@ -466,6 +466,7 @@ void mm_update_next_owner(struct mm_struct *mm) +@@ -466,6 +466,7 @@ assign_new_owner: goto retry; } WRITE_ONCE(mm->owner, c); @@ -369,11 +357,9 @@ index 84021b24f79e..98a33bd7c25c 100644 task_unlock(c); put_task_struct(c); } -diff --git a/kernel/fork.c b/kernel/fork.c -index 2b6bd511c6ed..2dd4ca002a36 100644 --- a/kernel/fork.c +++ b/kernel/fork.c -@@ -1152,6 +1152,7 @@ static struct mm_struct *mm_init(struct mm_struct *mm, struct task_struct *p, +@@ -1152,6 +1152,7 @@ static struct mm_struct *mm_init(struct goto fail_nocontext; mm->user_ns = get_user_ns(user_ns); @@ -381,7 +367,7 @@ index 2b6bd511c6ed..2dd4ca002a36 100644 return mm; fail_nocontext: -@@ -1194,6 +1195,7 @@ static inline void __mmput(struct mm_struct *mm) +@@ -1194,6 +1195,7 @@ static inline void __mmput(struct mm_str } if (mm->binfmt) module_put(mm->binfmt->module); @@ -389,7 +375,7 @@ index 2b6bd511c6ed..2dd4ca002a36 100644 mmdrop(mm); } -@@ -2692,6 +2694,13 @@ pid_t kernel_clone(struct kernel_clone_args *args) +@@ -2692,6 +2694,13 @@ pid_t kernel_clone(struct kernel_clone_a get_task_struct(p); } @@ -403,11 +389,9 @@ index 2b6bd511c6ed..2dd4ca002a36 100644 wake_up_new_task(p); /* forking complete and child started to run, tell ptracer */ -diff --git a/kernel/sched/core.c b/kernel/sched/core.c -index ee28253c9ac0..c48c0a19642b 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -5166,6 +5166,7 @@ context_switch(struct rq *rq, struct task_struct *prev, +@@ -5166,6 +5166,7 @@ context_switch(struct rq *rq, struct tas * finish_task_switch()'s mmdrop(). */ switch_mm_irqs_off(prev->active_mm, next->mm, next); @@ -415,8 +399,6 @@ index ee28253c9ac0..c48c0a19642b 100644 if (!prev->mm) { // from kernel /* will mmdrop() in finish_task_switch(). */ -diff --git a/mm/memcontrol.c b/mm/memcontrol.c -index 882180866e31..1c18d7c1ce71 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -6199,6 +6199,30 @@ static void mem_cgroup_move_task(void) @@ -450,7 +432,7 @@ index 882180866e31..1c18d7c1ce71 100644 static int seq_puts_memcg_tunable(struct seq_file *m, unsigned long value) { if (value == PAGE_COUNTER_MAX) -@@ -6604,6 +6628,7 @@ struct cgroup_subsys memory_cgrp_subsys = { +@@ -6604,6 +6628,7 @@ struct cgroup_subsys memory_cgrp_subsys .css_reset = mem_cgroup_css_reset, .css_rstat_flush = mem_cgroup_css_rstat_flush, .can_attach = mem_cgroup_can_attach, @@ -458,8 +440,6 @@ index 882180866e31..1c18d7c1ce71 100644 .cancel_attach = mem_cgroup_cancel_attach, .post_attach = mem_cgroup_move_task, .dfl_cftypes = memory_files, -diff --git a/mm/vmscan.c b/mm/vmscan.c -index 8686918e238d..fcb437769a60 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -49,6 +49,8 @@ @@ -471,7 +451,7 @@ index 8686918e238d..fcb437769a60 100644 #include #include -@@ -3082,7 +3084,7 @@ static bool can_age_anon_pages(struct pglist_data *pgdat, +@@ -3082,7 +3084,7 @@ static bool can_age_anon_pages(struct pg for ((type) = 0; (type) < ANON_AND_FILE; (type)++) \ for ((zone) = 0; (zone) < MAX_NR_ZONES; (zone)++) @@ -480,11 +460,10 @@ index 8686918e238d..fcb437769a60 100644 { struct pglist_data *pgdat = NODE_DATA(nid); -@@ -3127,6 +3129,371 @@ static bool __maybe_unused seq_is_valid(struct lruvec *lruvec) - get_nr_gens(lruvec, LRU_GEN_ANON) <= MAX_NR_GENS; +@@ -3128,6 +3130,371 @@ static bool __maybe_unused seq_is_valid( } -+/****************************************************************************** + /****************************************************************************** + * mm_struct list + ******************************************************************************/ + @@ -849,10 +828,11 @@ index 8686918e238d..fcb437769a60 100644 + return success; +} + - /****************************************************************************** ++/****************************************************************************** * refault feedback loop ******************************************************************************/ -@@ -3277,6 +3644,118 @@ static int folio_inc_gen(struct lruvec *lruvec, struct folio *folio, bool reclai + +@@ -3277,6 +3644,118 @@ static int folio_inc_gen(struct lruvec * return new_gen; } @@ -971,7 +951,7 @@ index 8686918e238d..fcb437769a60 100644 static unsigned long get_pte_pfn(pte_t pte, struct vm_area_struct *vma, unsigned long addr) { unsigned long pfn = pte_pfn(pte); -@@ -3295,8 +3774,28 @@ static unsigned long get_pte_pfn(pte_t pte, struct vm_area_struct *vma, unsigned +@@ -3295,8 +3774,28 @@ static unsigned long get_pte_pfn(pte_t p return pfn; } @@ -1001,7 +981,7 @@ index 8686918e238d..fcb437769a60 100644 { struct folio *folio; -@@ -3311,9 +3810,375 @@ static struct folio *get_pfn_folio(unsigned long pfn, struct mem_cgroup *memcg, +@@ -3311,9 +3810,375 @@ static struct folio *get_pfn_folio(unsig if (folio_memcg_rcu(folio) != memcg) return NULL; @@ -1377,7 +1357,7 @@ index 8686918e238d..fcb437769a60 100644 static void inc_min_seq(struct lruvec *lruvec, int type) { struct lru_gen_struct *lrugen = &lruvec->lrugen; -@@ -3365,7 +4230,7 @@ static bool try_to_inc_min_seq(struct lruvec *lruvec, bool can_swap) +@@ -3365,7 +4230,7 @@ next: return success; } @@ -1386,7 +1366,7 @@ index 8686918e238d..fcb437769a60 100644 { int prev, next; int type, zone; -@@ -3375,9 +4240,6 @@ static void inc_max_seq(struct lruvec *lruvec, unsigned long max_seq, bool can_s +@@ -3375,9 +4240,6 @@ static void inc_max_seq(struct lruvec *l VM_WARN_ON_ONCE(!seq_is_valid(lruvec)); @@ -1396,7 +1376,7 @@ index 8686918e238d..fcb437769a60 100644 for (type = ANON_AND_FILE - 1; type >= 0; type--) { if (get_nr_gens(lruvec, type) != MAX_NR_GENS) continue; -@@ -3415,10 +4277,74 @@ static void inc_max_seq(struct lruvec *lruvec, unsigned long max_seq, bool can_s +@@ -3415,10 +4277,74 @@ static void inc_max_seq(struct lruvec *l /* make sure preceding modifications appear */ smp_store_release(&lrugen->max_seq, lrugen->max_seq + 1); @@ -1472,7 +1452,7 @@ index 8686918e238d..fcb437769a60 100644 static bool should_run_aging(struct lruvec *lruvec, unsigned long max_seq, unsigned long *min_seq, struct scan_control *sc, bool can_swap, unsigned long *nr_to_scan) { -@@ -3494,7 +4420,7 @@ static void age_lruvec(struct lruvec *lruvec, struct scan_control *sc) +@@ -3494,7 +4420,7 @@ static void age_lruvec(struct lruvec *lr need_aging = should_run_aging(lruvec, max_seq, min_seq, sc, swappiness, &nr_to_scan); if (need_aging) @@ -1481,7 +1461,7 @@ index 8686918e238d..fcb437769a60 100644 } static void lru_gen_age_node(struct pglist_data *pgdat, struct scan_control *sc) -@@ -3503,6 +4429,8 @@ static void lru_gen_age_node(struct pglist_data *pgdat, struct scan_control *sc) +@@ -3503,6 +4429,8 @@ static void lru_gen_age_node(struct pgli VM_WARN_ON_ONCE(!current_is_kswapd()); @@ -1490,7 +1470,7 @@ index 8686918e238d..fcb437769a60 100644 memcg = mem_cgroup_iter(NULL, NULL, NULL); do { struct lruvec *lruvec = mem_cgroup_lruvec(memcg, pgdat); -@@ -3511,11 +4439,16 @@ static void lru_gen_age_node(struct pglist_data *pgdat, struct scan_control *sc) +@@ -3511,11 +4439,16 @@ static void lru_gen_age_node(struct pgli cond_resched(); } while ((memcg = mem_cgroup_iter(NULL, memcg, NULL))); @@ -1508,7 +1488,7 @@ index 8686918e238d..fcb437769a60 100644 */ void lru_gen_look_around(struct page_vma_mapped_walk *pvmw) { -@@ -3524,6 +4457,8 @@ void lru_gen_look_around(struct page_vma_mapped_walk *pvmw) +@@ -3524,6 +4457,8 @@ void lru_gen_look_around(struct page_vma unsigned long start; unsigned long end; unsigned long addr; @@ -1517,7 +1497,7 @@ index 8686918e238d..fcb437769a60 100644 unsigned long bitmap[BITS_TO_LONGS(MIN_LRU_BATCH)] = {}; struct folio *folio = pfn_folio(pvmw->pfn); struct mem_cgroup *memcg = folio_memcg(folio); -@@ -3538,6 +4473,9 @@ void lru_gen_look_around(struct page_vma_mapped_walk *pvmw) +@@ -3538,6 +4473,9 @@ void lru_gen_look_around(struct page_vma if (spin_is_contended(pvmw->ptl)) return; @@ -1527,7 +1507,7 @@ index 8686918e238d..fcb437769a60 100644 start = max(pvmw->address & PMD_MASK, pvmw->vma->vm_start); end = min(pvmw->address | ~PMD_MASK, pvmw->vma->vm_end - 1) + 1; -@@ -3567,13 +4505,15 @@ void lru_gen_look_around(struct page_vma_mapped_walk *pvmw) +@@ -3567,13 +4505,15 @@ void lru_gen_look_around(struct page_vma if (!pte_young(pte[i])) continue; @@ -1544,7 +1524,7 @@ index 8686918e238d..fcb437769a60 100644 if (pte_dirty(pte[i]) && !folio_test_dirty(folio) && !(folio_test_anon(folio) && folio_test_swapbacked(folio) && !folio_test_swapcache(folio))) -@@ -3589,7 +4529,11 @@ void lru_gen_look_around(struct page_vma_mapped_walk *pvmw) +@@ -3589,7 +4529,11 @@ void lru_gen_look_around(struct page_vma arch_leave_lazy_mmu_mode(); rcu_read_unlock(); @@ -1557,7 +1537,7 @@ index 8686918e238d..fcb437769a60 100644 for_each_set_bit(i, bitmap, MIN_LRU_BATCH) { folio = pfn_folio(pte_pfn(pte[i])); folio_activate(folio); -@@ -3601,8 +4545,10 @@ void lru_gen_look_around(struct page_vma_mapped_walk *pvmw) +@@ -3601,8 +4545,10 @@ void lru_gen_look_around(struct page_vma if (!mem_cgroup_trylock_pages(memcg)) return; @@ -1570,7 +1550,7 @@ index 8686918e238d..fcb437769a60 100644 for_each_set_bit(i, bitmap, MIN_LRU_BATCH) { folio = pfn_folio(pte_pfn(pte[i])); -@@ -3613,10 +4559,14 @@ void lru_gen_look_around(struct page_vma_mapped_walk *pvmw) +@@ -3613,10 +4559,14 @@ void lru_gen_look_around(struct page_vma if (old_gen < 0 || old_gen == new_gen) continue; @@ -1587,7 +1567,7 @@ index 8686918e238d..fcb437769a60 100644 mem_cgroup_unlock_pages(); } -@@ -3899,6 +4849,7 @@ static int evict_folios(struct lruvec *lruvec, struct scan_control *sc, int swap +@@ -3899,6 +4849,7 @@ static int evict_folios(struct lruvec *l struct folio *folio; enum vm_event_item item; struct reclaim_stat stat; @@ -1595,7 +1575,7 @@ index 8686918e238d..fcb437769a60 100644 struct mem_cgroup *memcg = lruvec_memcg(lruvec); struct pglist_data *pgdat = lruvec_pgdat(lruvec); -@@ -3935,6 +4886,10 @@ static int evict_folios(struct lruvec *lruvec, struct scan_control *sc, int swap +@@ -3935,6 +4886,10 @@ static int evict_folios(struct lruvec *l move_pages_to_lru(lruvec, &list); @@ -1606,7 +1586,7 @@ index 8686918e238d..fcb437769a60 100644 item = current_is_kswapd() ? PGSTEAL_KSWAPD : PGSTEAL_DIRECT; if (!cgroup_reclaim(sc)) __count_vm_events(item, reclaimed); -@@ -3951,6 +4906,11 @@ static int evict_folios(struct lruvec *lruvec, struct scan_control *sc, int swap +@@ -3951,6 +4906,11 @@ static int evict_folios(struct lruvec *l return scanned; } @@ -1618,7 +1598,7 @@ index 8686918e238d..fcb437769a60 100644 static unsigned long get_nr_to_scan(struct lruvec *lruvec, struct scan_control *sc, bool can_swap) { -@@ -3976,7 +4936,8 @@ static unsigned long get_nr_to_scan(struct lruvec *lruvec, struct scan_control * +@@ -3976,7 +4936,8 @@ static unsigned long get_nr_to_scan(stru if (current_is_kswapd()) return 0; @@ -1628,7 +1608,7 @@ index 8686918e238d..fcb437769a60 100644 done: return min_seq[!can_swap] + MIN_NR_GENS <= max_seq ? nr_to_scan : 0; } -@@ -3990,6 +4951,8 @@ static void lru_gen_shrink_lruvec(struct lruvec *lruvec, struct scan_control *sc +@@ -3990,6 +4951,8 @@ static void lru_gen_shrink_lruvec(struct blk_start_plug(&plug); @@ -1637,7 +1617,7 @@ index 8686918e238d..fcb437769a60 100644 while (true) { int delta; int swappiness; -@@ -4017,6 +4980,8 @@ static void lru_gen_shrink_lruvec(struct lruvec *lruvec, struct scan_control *sc +@@ -4017,6 +4980,8 @@ static void lru_gen_shrink_lruvec(struct cond_resched(); } @@ -1646,7 +1626,7 @@ index 8686918e238d..fcb437769a60 100644 blk_finish_plug(&plug); } -@@ -4033,15 +4998,21 @@ void lru_gen_init_lruvec(struct lruvec *lruvec) +@@ -4033,15 +4998,21 @@ void lru_gen_init_lruvec(struct lruvec * for_each_gen_type_zone(gen, type, zone) INIT_LIST_HEAD(&lrugen->lists[gen][type][zone]); @@ -1668,7 +1648,7 @@ index 8686918e238d..fcb437769a60 100644 int nid; for_each_node(nid) { -@@ -4049,6 +5020,11 @@ void lru_gen_exit_memcg(struct mem_cgroup *memcg) +@@ -4049,6 +5020,11 @@ void lru_gen_exit_memcg(struct mem_cgrou VM_WARN_ON_ONCE(memchr_inv(lruvec->lrugen.nr_pages, 0, sizeof(lruvec->lrugen.nr_pages))); @@ -1680,6 +1660,3 @@ index 8686918e238d..fcb437769a60 100644 } } #endif --- -2.17.1 - diff --git a/target/linux/generic/backport-6.0/108-mm-multi-gen-LRU-optimize-multiple-memcgs.patch b/target/linux/generic/backport-6.0/108-mm-multi-gen-LRU-optimize-multiple-memcgs.patch index 2987fd21b..5430cc66e 100644 --- a/target/linux/generic/backport-6.0/108-mm-multi-gen-LRU-optimize-multiple-memcgs.patch +++ b/target/linux/generic/backport-6.0/108-mm-multi-gen-LRU-optimize-multiple-memcgs.patch @@ -110,8 +110,6 @@ Change-Id: I7e00e0c733437e534ac98031cf8154a681becc00 mm/vmscan.c | 104 +++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 95 insertions(+), 9 deletions(-) -diff --git a/mm/vmscan.c b/mm/vmscan.c -index fcb437769a60..e7b74ab67973 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -131,6 +131,12 @@ struct scan_control { @@ -127,7 +125,7 @@ index fcb437769a60..e7b74ab67973 100644 /* Allocation order */ s8 order; -@@ -4429,6 +4435,19 @@ static void lru_gen_age_node(struct pglist_data *pgdat, struct scan_control *sc) +@@ -4429,6 +4435,19 @@ static void lru_gen_age_node(struct pgli VM_WARN_ON_ONCE(!current_is_kswapd()); @@ -147,7 +145,7 @@ index fcb437769a60..e7b74ab67973 100644 set_mm_walk(pgdat); memcg = mem_cgroup_iter(NULL, NULL, NULL); -@@ -4840,7 +4859,8 @@ static int isolate_folios(struct lruvec *lruvec, struct scan_control *sc, int sw +@@ -4840,7 +4859,8 @@ static int isolate_folios(struct lruvec return scanned; } @@ -157,7 +155,7 @@ index fcb437769a60..e7b74ab67973 100644 { int type; int scanned; -@@ -4903,6 +4923,9 @@ static int evict_folios(struct lruvec *lruvec, struct scan_control *sc, int swap +@@ -4903,6 +4923,9 @@ static int evict_folios(struct lruvec *l sc->nr_reclaimed += reclaimed; @@ -167,7 +165,7 @@ index fcb437769a60..e7b74ab67973 100644 return scanned; } -@@ -4912,9 +4935,8 @@ static int evict_folios(struct lruvec *lruvec, struct scan_control *sc, int swap +@@ -4912,9 +4935,8 @@ static int evict_folios(struct lruvec *l * reclaim. */ static unsigned long get_nr_to_scan(struct lruvec *lruvec, struct scan_control *sc, @@ -178,7 +176,7 @@ index fcb437769a60..e7b74ab67973 100644 unsigned long nr_to_scan; struct mem_cgroup *memcg = lruvec_memcg(lruvec); DEFINE_MAX_SEQ(lruvec); -@@ -4924,8 +4946,8 @@ static unsigned long get_nr_to_scan(struct lruvec *lruvec, struct scan_control * +@@ -4924,8 +4946,8 @@ static unsigned long get_nr_to_scan(stru (mem_cgroup_below_low(memcg) && !sc->memcg_low_reclaim)) return 0; @@ -189,7 +187,7 @@ index fcb437769a60..e7b74ab67973 100644 return nr_to_scan; /* skip the aging path at the default priority */ -@@ -4942,10 +4964,67 @@ static unsigned long get_nr_to_scan(struct lruvec *lruvec, struct scan_control * +@@ -4942,10 +4964,67 @@ done: return min_seq[!can_swap] + MIN_NR_GENS <= max_seq ? nr_to_scan : 0; } @@ -257,7 +255,7 @@ index fcb437769a60..e7b74ab67973 100644 lru_add_drain(); -@@ -4965,21 +5044,28 @@ static void lru_gen_shrink_lruvec(struct lruvec *lruvec, struct scan_control *sc +@@ -4965,21 +5044,28 @@ static void lru_gen_shrink_lruvec(struct else swappiness = 0; @@ -290,6 +288,3 @@ index fcb437769a60..e7b74ab67973 100644 clear_mm_walk(); blk_finish_plug(&plug); --- -2.17.1 - diff --git a/target/linux/generic/backport-6.0/109-mm-multi-gen-LRU-kill-switch.patch b/target/linux/generic/backport-6.0/109-mm-multi-gen-LRU-kill-switch.patch index 1741d1219..384365a33 100644 --- a/target/linux/generic/backport-6.0/109-mm-multi-gen-LRU-kill-switch.patch +++ b/target/linux/generic/backport-6.0/109-mm-multi-gen-LRU-kill-switch.patch @@ -64,11 +64,9 @@ Change-Id: I4c909618e8fed7fb1337f6624bbe542ec920a515 mm/vmscan.c | 228 +++++++++++++++++++++++++++++++- 6 files changed, 265 insertions(+), 9 deletions(-) -diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h -index ac5d0515680e..9179463c3c9f 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h -@@ -432,6 +432,18 @@ static inline void cgroup_put(struct cgroup *cgrp) +@@ -432,6 +432,18 @@ static inline void cgroup_put(struct cgr css_put(&cgrp->self); } @@ -87,7 +85,7 @@ index ac5d0515680e..9179463c3c9f 100644 /** * task_css_set_check - obtain a task's css_set with extra access conditions * @task: the task to obtain css_set for -@@ -446,7 +458,6 @@ static inline void cgroup_put(struct cgroup *cgrp) +@@ -446,7 +458,6 @@ static inline void cgroup_put(struct cgr * as locks used during the cgroup_subsys::attach() methods. */ #ifdef CONFIG_PROVE_RCU @@ -104,11 +102,9 @@ index ac5d0515680e..9179463c3c9f 100644 static inline int cgroup_attach_task_all(struct task_struct *from, struct task_struct *t) { return 0; } static inline int cgroupstats_build(struct cgroupstats *stats, -diff --git a/include/linux/mm_inline.h b/include/linux/mm_inline.h -index f2b2296a42f9..4949eda9a9a2 100644 --- a/include/linux/mm_inline.h +++ b/include/linux/mm_inline.h -@@ -106,10 +106,21 @@ static __always_inline enum lru_list folio_lru_list(struct folio *folio) +@@ -106,10 +106,21 @@ static __always_inline enum lru_list fol #ifdef CONFIG_LRU_GEN @@ -131,7 +127,7 @@ index f2b2296a42f9..4949eda9a9a2 100644 static inline bool lru_gen_in_fault(void) { -@@ -222,7 +233,7 @@ static inline bool lru_gen_add_folio(struct lruvec *lruvec, struct folio *folio, +@@ -222,7 +233,7 @@ static inline bool lru_gen_add_folio(str VM_WARN_ON_ONCE_FOLIO(gen != -1, folio); @@ -140,8 +136,6 @@ index f2b2296a42f9..4949eda9a9a2 100644 return false; /* * There are three common cases for this page: -diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h -index e5cf37dc41a4..39bca2e420b7 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -384,6 +384,13 @@ enum { @@ -167,8 +161,6 @@ index e5cf37dc41a4..39bca2e420b7 100644 }; enum { -diff --git a/kernel/cgroup/cgroup-internal.h b/kernel/cgroup/cgroup-internal.h -index 36b740cb3d59..63dc3e82be4f 100644 --- a/kernel/cgroup/cgroup-internal.h +++ b/kernel/cgroup/cgroup-internal.h @@ -164,7 +164,6 @@ struct cgroup_mgctx { @@ -179,8 +171,6 @@ index 36b740cb3d59..63dc3e82be4f 100644 extern spinlock_t css_set_lock; extern struct cgroup_subsys *cgroup_subsys[]; extern struct list_head cgroup_roots; -diff --git a/mm/Kconfig b/mm/Kconfig -index 5101dca8f21c..6c86849c4db9 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -1133,6 +1133,12 @@ config LRU_GEN @@ -196,8 +186,6 @@ index 5101dca8f21c..6c86849c4db9 100644 config LRU_GEN_STATS bool "Full stats for debugging" depends on LRU_GEN -diff --git a/mm/vmscan.c b/mm/vmscan.c -index e7b74ab67973..ea3d497019ab 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -51,6 +51,7 @@ @@ -208,7 +196,7 @@ index e7b74ab67973..ea3d497019ab 100644 #include #include -@@ -3070,6 +3071,14 @@ static bool can_age_anon_pages(struct pglist_data *pgdat, +@@ -3070,6 +3071,14 @@ static bool can_age_anon_pages(struct pg #ifdef CONFIG_LRU_GEN @@ -223,7 +211,7 @@ index e7b74ab67973..ea3d497019ab 100644 /****************************************************************************** * shorthand helpers ******************************************************************************/ -@@ -3946,7 +3955,8 @@ static void walk_pmd_range_locked(pud_t *pud, unsigned long next, struct vm_area +@@ -3946,7 +3955,8 @@ static void walk_pmd_range_locked(pud_t goto next; if (!pmd_trans_huge(pmd[i])) { @@ -233,7 +221,7 @@ index e7b74ab67973..ea3d497019ab 100644 pmdp_test_and_clear_young(vma, addr, pmd + i); goto next; } -@@ -4044,10 +4054,12 @@ static void walk_pmd_range(pud_t *pud, unsigned long start, unsigned long end, +@@ -4044,10 +4054,12 @@ restart: walk->mm_stats[MM_NONLEAF_TOTAL]++; #ifdef CONFIG_ARCH_HAS_NONLEAF_PMD_YOUNG @@ -249,7 +237,7 @@ index e7b74ab67973..ea3d497019ab 100644 #endif if (!walk->force_scan && !test_bloom_filter(walk->lruvec, walk->max_seq, pmd + i)) continue; -@@ -4309,7 +4321,7 @@ static bool try_to_inc_max_seq(struct lruvec *lruvec, unsigned long max_seq, +@@ -4309,7 +4321,7 @@ static bool try_to_inc_max_seq(struct lr * handful of PTEs. Spreading the work out over a period of time usually * is less efficient, but it avoids bursty page faults. */ @@ -258,11 +246,10 @@ index e7b74ab67973..ea3d497019ab 100644 success = iterate_mm_list_nowalk(lruvec, max_seq); goto done; } -@@ -5071,6 +5083,208 @@ static void lru_gen_shrink_lruvec(struct lruvec *lruvec, struct scan_control *sc - blk_finish_plug(&plug); +@@ -5072,6 +5084,208 @@ done: } -+/****************************************************************************** + /****************************************************************************** + * state change + ******************************************************************************/ + @@ -464,10 +451,11 @@ index e7b74ab67973..ea3d497019ab 100644 + .attrs = lru_gen_attrs, +}; + - /****************************************************************************** ++/****************************************************************************** * initialization ******************************************************************************/ -@@ -5081,6 +5295,7 @@ void lru_gen_init_lruvec(struct lruvec *lruvec) + +@@ -5081,6 +5295,7 @@ void lru_gen_init_lruvec(struct lruvec * struct lru_gen_struct *lrugen = &lruvec->lrugen; lrugen->max_seq = MIN_NR_GENS + 1; @@ -485,6 +473,3 @@ index e7b74ab67973..ea3d497019ab 100644 return 0; }; late_initcall(init_lru_gen); --- -2.17.1 - diff --git a/target/linux/generic/backport-6.0/110-mm-multi-gen-LRU-thrashing-prevention.patch b/target/linux/generic/backport-6.0/110-mm-multi-gen-LRU-thrashing-prevention.patch index 905bc5cc0..58492dcff 100644 --- a/target/linux/generic/backport-6.0/110-mm-multi-gen-LRU-thrashing-prevention.patch +++ b/target/linux/generic/backport-6.0/110-mm-multi-gen-LRU-thrashing-prevention.patch @@ -44,8 +44,6 @@ Change-Id: I007499d7e47374b59fd620e8c3962940bc9f788e mm/vmscan.c | 74 ++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 73 insertions(+), 3 deletions(-) -diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h -index 39bca2e420b7..0c502618b37b 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -419,6 +419,8 @@ struct lru_gen_struct { @@ -57,11 +55,9 @@ index 39bca2e420b7..0c502618b37b 100644 /* the multi-gen LRU lists, lazily sorted on eviction */ struct list_head lists[MAX_NR_GENS][ANON_AND_FILE][MAX_NR_ZONES]; /* the multi-gen LRU sizes, eventually consistent */ -diff --git a/mm/vmscan.c b/mm/vmscan.c -index ea3d497019ab..0df253819edc 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c -@@ -4293,6 +4293,7 @@ static void inc_max_seq(struct lruvec *lruvec, bool can_swap) +@@ -4293,6 +4293,7 @@ static void inc_max_seq(struct lruvec *l for (type = 0; type < ANON_AND_FILE; type++) reset_ctrl_pos(lruvec, type, false); @@ -69,7 +65,7 @@ index ea3d497019ab..0df253819edc 100644 /* make sure preceding modifications appear */ smp_store_release(&lrugen->max_seq, lrugen->max_seq + 1); -@@ -4420,7 +4421,7 @@ static bool should_run_aging(struct lruvec *lruvec, unsigned long max_seq, unsig +@@ -4420,7 +4421,7 @@ static bool should_run_aging(struct lruv return false; } @@ -78,7 +74,7 @@ index ea3d497019ab..0df253819edc 100644 { bool need_aging; unsigned long nr_to_scan; -@@ -4434,16 +4435,36 @@ static void age_lruvec(struct lruvec *lruvec, struct scan_control *sc) +@@ -4434,16 +4435,36 @@ static void age_lruvec(struct lruvec *lr mem_cgroup_calculate_protection(NULL, memcg); if (mem_cgroup_below_min(memcg)) @@ -116,7 +112,7 @@ index ea3d497019ab..0df253819edc 100644 VM_WARN_ON_ONCE(!current_is_kswapd()); -@@ -4466,12 +4487,32 @@ static void lru_gen_age_node(struct pglist_data *pgdat, struct scan_control *sc) +@@ -4466,12 +4487,32 @@ static void lru_gen_age_node(struct pgli do { struct lruvec *lruvec = mem_cgroup_lruvec(memcg, pgdat); @@ -150,7 +146,7 @@ index ea3d497019ab..0df253819edc 100644 } /* -@@ -5228,6 +5269,28 @@ static void lru_gen_change_state(bool enabled) +@@ -5228,6 +5269,28 @@ unlock: * sysfs interface ******************************************************************************/ @@ -179,7 +175,7 @@ index ea3d497019ab..0df253819edc 100644 static ssize_t show_enabled(struct kobject *kobj, struct kobj_attribute *attr, char *buf) { unsigned int caps = 0; -@@ -5276,6 +5339,7 @@ static struct kobj_attribute lru_gen_enabled_attr = __ATTR( +@@ -5276,6 +5339,7 @@ static struct kobj_attribute lru_gen_ena ); static struct attribute *lru_gen_attrs[] = { @@ -187,7 +183,7 @@ index ea3d497019ab..0df253819edc 100644 &lru_gen_enabled_attr.attr, NULL }; -@@ -5291,12 +5355,16 @@ static struct attribute_group lru_gen_attr_group = { +@@ -5291,12 +5355,16 @@ static struct attribute_group lru_gen_at void lru_gen_init_lruvec(struct lruvec *lruvec) { @@ -204,6 +200,3 @@ index ea3d497019ab..0df253819edc 100644 for_each_gen_type_zone(gen, type, zone) INIT_LIST_HEAD(&lrugen->lists[gen][type][zone]); --- -2.17.1 - diff --git a/target/linux/generic/backport-6.0/111-mm-multi-gen-LRU-debugfs-interface.patch b/target/linux/generic/backport-6.0/111-mm-multi-gen-LRU-debugfs-interface.patch index 05206e553..2c63332f9 100644 --- a/target/linux/generic/backport-6.0/111-mm-multi-gen-LRU-debugfs-interface.patch +++ b/target/linux/generic/backport-6.0/111-mm-multi-gen-LRU-debugfs-interface.patch @@ -42,11 +42,9 @@ Change-Id: I7bb06f14e0a94901a076cc3767d0855d4f1ea3ab mm/vmscan.c | 411 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 402 insertions(+), 10 deletions(-) -diff --git a/include/linux/nodemask.h b/include/linux/nodemask.h -index 4b71a96190a8..3a0eec9f2faa 100644 --- a/include/linux/nodemask.h +++ b/include/linux/nodemask.h -@@ -493,6 +493,7 @@ static inline int num_node_state(enum node_states state) +@@ -493,6 +493,7 @@ static inline int num_node_state(enum no #define first_online_node 0 #define first_memory_node 0 #define next_online_node(nid) (MAX_NUMNODES) @@ -54,8 +52,6 @@ index 4b71a96190a8..3a0eec9f2faa 100644 #define nr_node_ids 1U #define nr_online_nodes 1U -diff --git a/mm/vmscan.c b/mm/vmscan.c -index 0df253819edc..3e7aad06299b 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -52,6 +52,7 @@ @@ -108,7 +104,7 @@ index 0df253819edc..3e7aad06299b 100644 } static bool try_to_inc_min_seq(struct lruvec *lruvec, bool can_swap) -@@ -4248,7 +4277,7 @@ static bool try_to_inc_min_seq(struct lruvec *lruvec, bool can_swap) +@@ -4248,7 +4277,7 @@ next: return success; } @@ -117,7 +113,7 @@ index 0df253819edc..3e7aad06299b 100644 { int prev, next; int type, zone; -@@ -4262,9 +4291,13 @@ static void inc_max_seq(struct lruvec *lruvec, bool can_swap) +@@ -4262,9 +4291,13 @@ static void inc_max_seq(struct lruvec *l if (get_nr_gens(lruvec, type) != MAX_NR_GENS) continue; @@ -133,7 +129,7 @@ index 0df253819edc..3e7aad06299b 100644 } /* -@@ -4301,7 +4334,7 @@ static void inc_max_seq(struct lruvec *lruvec, bool can_swap) +@@ -4301,7 +4334,7 @@ static void inc_max_seq(struct lruvec *l } static bool try_to_inc_max_seq(struct lruvec *lruvec, unsigned long max_seq, @@ -142,7 +138,7 @@ index 0df253819edc..3e7aad06299b 100644 { bool success; struct lru_gen_mm_walk *walk; -@@ -4322,7 +4355,7 @@ static bool try_to_inc_max_seq(struct lruvec *lruvec, unsigned long max_seq, +@@ -4322,7 +4355,7 @@ static bool try_to_inc_max_seq(struct lr * handful of PTEs. Spreading the work out over a period of time usually * is less efficient, but it avoids bursty page faults. */ @@ -151,7 +147,7 @@ index 0df253819edc..3e7aad06299b 100644 success = iterate_mm_list_nowalk(lruvec, max_seq); goto done; } -@@ -4336,7 +4369,7 @@ static bool try_to_inc_max_seq(struct lruvec *lruvec, unsigned long max_seq, +@@ -4336,7 +4369,7 @@ static bool try_to_inc_max_seq(struct lr walk->lruvec = lruvec; walk->max_seq = max_seq; walk->can_swap = can_swap; @@ -160,7 +156,7 @@ index 0df253819edc..3e7aad06299b 100644 do { success = iterate_mm_list(lruvec, walk, &mm); -@@ -4356,7 +4389,7 @@ static bool try_to_inc_max_seq(struct lruvec *lruvec, unsigned long max_seq, +@@ -4356,7 +4389,7 @@ done: VM_WARN_ON_ONCE(max_seq != READ_ONCE(lrugen->max_seq)); @@ -169,7 +165,7 @@ index 0df253819edc..3e7aad06299b 100644 /* either this sees any waiters or they will see updated max_seq */ if (wq_has_sleeper(&lruvec->mm_state.wait)) wake_up_all(&lruvec->mm_state.wait); -@@ -4452,7 +4485,7 @@ static bool age_lruvec(struct lruvec *lruvec, struct scan_control *sc, unsigned +@@ -4452,7 +4485,7 @@ static bool age_lruvec(struct lruvec *lr } if (need_aging) @@ -178,7 +174,7 @@ index 0df253819edc..3e7aad06299b 100644 return true; } -@@ -5011,7 +5044,7 @@ static unsigned long get_nr_to_scan(struct lruvec *lruvec, struct scan_control * +@@ -5011,7 +5044,7 @@ static unsigned long get_nr_to_scan(stru if (current_is_kswapd()) return 0; @@ -187,11 +183,10 @@ index 0df253819edc..3e7aad06299b 100644 return nr_to_scan; done: return min_seq[!can_swap] + MIN_NR_GENS <= max_seq ? nr_to_scan : 0; -@@ -5349,6 +5382,361 @@ static struct attribute_group lru_gen_attr_group = { - .attrs = lru_gen_attrs, +@@ -5350,6 +5383,361 @@ static struct attribute_group lru_gen_at }; -+/****************************************************************************** + /****************************************************************************** + * debugfs interface + ******************************************************************************/ + @@ -546,9 +541,10 @@ index 0df253819edc..3e7aad06299b 100644 + .release = seq_release, +}; + - /****************************************************************************** ++/****************************************************************************** * initialization ******************************************************************************/ + @@ -5406,6 +5794,9 @@ static int __init init_lru_gen(void) if (sysfs_create_group(mm_kobj, &lru_gen_attr_group)) pr_err("lru_gen: failed to create sysfs group\n"); @@ -559,6 +555,3 @@ index 0df253819edc..3e7aad06299b 100644 return 0; }; late_initcall(init_lru_gen); --- -2.17.1 - diff --git a/target/linux/generic/backport-6.0/112-mm-multi-gen-LRU-admin-guide.patch b/target/linux/generic/backport-6.0/112-mm-multi-gen-LRU-admin-guide.patch index beb7bd298..bbf418b84 100644 --- a/target/linux/generic/backport-6.0/112-mm-multi-gen-LRU-admin-guide.patch +++ b/target/linux/generic/backport-6.0/112-mm-multi-gen-LRU-admin-guide.patch @@ -30,8 +30,6 @@ Change-Id: I1902178bcbb5adfa0a748c4d284a6456059bdd7e 4 files changed, 169 insertions(+), 1 deletion(-) create mode 100644 Documentation/admin-guide/mm/multigen_lru.rst -diff --git a/Documentation/admin-guide/mm/index.rst b/Documentation/admin-guide/mm/index.rst -index 1bd11118dfb1..d1064e0ba34a 100644 --- a/Documentation/admin-guide/mm/index.rst +++ b/Documentation/admin-guide/mm/index.rst @@ -32,6 +32,7 @@ the Linux memory management. @@ -42,9 +40,6 @@ index 1bd11118dfb1..d1064e0ba34a 100644 nommu-mmap numa_memory_policy numaperf -diff --git a/Documentation/admin-guide/mm/multigen_lru.rst b/Documentation/admin-guide/mm/multigen_lru.rst -new file mode 100644 -index 000000000000..33e068830497 --- /dev/null +++ b/Documentation/admin-guide/mm/multigen_lru.rst @@ -0,0 +1,162 @@ @@ -210,8 +205,6 @@ index 000000000000..33e068830497 +server according to the ranking result obtained from the working set +estimation step. This less forceful approach limits the impacts on the +existing jobs. -diff --git a/mm/Kconfig b/mm/Kconfig -index 6c86849c4db9..96cd3ae25c6f 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -1131,7 +1131,8 @@ config LRU_GEN @@ -224,11 +217,9 @@ index 6c86849c4db9..96cd3ae25c6f 100644 config LRU_GEN_ENABLED bool "Enable by default" -diff --git a/mm/vmscan.c b/mm/vmscan.c -index 3e7aad06299b..146a54cf1bd9 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c -@@ -5307,6 +5307,7 @@ static ssize_t show_min_ttl(struct kobject *kobj, struct kobj_attribute *attr, c +@@ -5307,6 +5307,7 @@ static ssize_t show_min_ttl(struct kobje return sprintf(buf, "%u\n", jiffies_to_msecs(READ_ONCE(lru_gen_min_ttl))); } @@ -236,7 +227,7 @@ index 3e7aad06299b..146a54cf1bd9 100644 static ssize_t store_min_ttl(struct kobject *kobj, struct kobj_attribute *attr, const char *buf, size_t len) { -@@ -5340,6 +5341,7 @@ static ssize_t show_enabled(struct kobject *kobj, struct kobj_attribute *attr, c +@@ -5340,6 +5341,7 @@ static ssize_t show_enabled(struct kobje return snprintf(buf, PAGE_SIZE, "0x%04x\n", caps); } @@ -244,7 +235,7 @@ index 3e7aad06299b..146a54cf1bd9 100644 static ssize_t store_enabled(struct kobject *kobj, struct kobj_attribute *attr, const char *buf, size_t len) { -@@ -5487,6 +5489,7 @@ static void lru_gen_seq_show_full(struct seq_file *m, struct lruvec *lruvec, +@@ -5487,6 +5489,7 @@ static void lru_gen_seq_show_full(struct seq_putc(m, '\n'); } @@ -252,7 +243,7 @@ index 3e7aad06299b..146a54cf1bd9 100644 static int lru_gen_seq_show(struct seq_file *m, void *v) { unsigned long seq; -@@ -5645,6 +5648,7 @@ static int run_cmd(char cmd, int memcg_id, int nid, unsigned long seq, +@@ -5645,6 +5648,7 @@ done: return err; } @@ -260,6 +251,3 @@ index 3e7aad06299b..146a54cf1bd9 100644 static ssize_t lru_gen_seq_write(struct file *file, const char __user *src, size_t len, loff_t *pos) { --- -2.17.1 - diff --git a/target/linux/generic/backport-6.0/113-mm-multi-gen-LRU-design-doc.patch b/target/linux/generic/backport-6.0/113-mm-multi-gen-LRU-design-doc.patch index 5b2ed0c90..bf1dc061c 100644 --- a/target/linux/generic/backport-6.0/113-mm-multi-gen-LRU-design-doc.patch +++ b/target/linux/generic/backport-6.0/113-mm-multi-gen-LRU-design-doc.patch @@ -28,11 +28,9 @@ Change-Id: I958afcabf5abc37b3e58f72638d35a349c31b98d 2 files changed, 160 insertions(+) create mode 100644 Documentation/mm/multigen_lru.rst -diff --git a/Documentation/mm/index.rst b/Documentation/mm/index.rst -index 575ccd40e30c..4aa12b8be278 100644 --- a/Documentation/mm/index.rst +++ b/Documentation/mm/index.rst -@@ -51,6 +51,7 @@ above structured documentation, or deleted if it has served its purpose. +@@ -51,6 +51,7 @@ above structured documentation, or delet ksm memory-model mmu_notifier @@ -40,9 +38,6 @@ index 575ccd40e30c..4aa12b8be278 100644 numa overcommit-accounting page_migration -diff --git a/Documentation/mm/multigen_lru.rst b/Documentation/mm/multigen_lru.rst -new file mode 100644 -index 000000000000..d7062c6a8946 --- /dev/null +++ b/Documentation/mm/multigen_lru.rst @@ -0,0 +1,159 @@ @@ -205,6 +200,3 @@ index 000000000000..d7062c6a8946 +inserting hot densely populated page tables to the Bloom filters. +Within the eviction, the PID controller uses refaults as the feedback +to select types to evict and tiers to protect. --- -2.17.1 - diff --git a/target/linux/generic/hack-6.0/410-block-fit-partition-parser.patch b/target/linux/generic/hack-6.0/410-block-fit-partition-parser.patch index 235ebd641..38856ded7 100644 --- a/target/linux/generic/hack-6.0/410-block-fit-partition-parser.patch +++ b/target/linux/generic/hack-6.0/410-block-fit-partition-parser.patch @@ -1,6 +1,6 @@ --- a/block/blk.h +++ b/block/blk.h -@@ -407,6 +407,8 @@ void blk_free_ext_minor(unsigned int min +@@ -406,6 +406,8 @@ void blk_free_ext_minor(unsigned int min #define ADDPART_FLAG_NONE 0 #define ADDPART_FLAG_RAID 1 #define ADDPART_FLAG_WHOLEDISK 2 diff --git a/target/linux/generic/hack-6.0/760-net-usb-r8152-add-LED-configuration-from-OF.patch b/target/linux/generic/hack-6.0/760-net-usb-r8152-add-LED-configuration-from-OF.patch index c315dcf8f..db471b4f0 100644 --- a/target/linux/generic/hack-6.0/760-net-usb-r8152-add-LED-configuration-from-OF.patch +++ b/target/linux/generic/hack-6.0/760-net-usb-r8152-add-LED-configuration-from-OF.patch @@ -22,7 +22,7 @@ Signed-off-by: David Bauer #include #include #include -@@ -6864,6 +6865,22 @@ static void rtl_tally_reset(struct r8152 +@@ -6866,6 +6867,22 @@ static void rtl_tally_reset(struct r8152 ocp_write_word(tp, MCU_TYPE_PLA, PLA_RSTTALLY, ocp_data); } @@ -45,7 +45,7 @@ Signed-off-by: David Bauer static void r8152b_init(struct r8152 *tp) { u32 ocp_data; -@@ -6905,6 +6922,8 @@ static void r8152b_init(struct r8152 *tp +@@ -6907,6 +6924,8 @@ static void r8152b_init(struct r8152 *tp ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_USB_CTRL); ocp_data &= ~(RX_AGG_DISABLE | RX_ZERO_EN); ocp_write_word(tp, MCU_TYPE_USB, USB_USB_CTRL, ocp_data); @@ -54,7 +54,7 @@ Signed-off-by: David Bauer } static void r8153_init(struct r8152 *tp) -@@ -7045,6 +7064,8 @@ static void r8153_init(struct r8152 *tp) +@@ -7047,6 +7066,8 @@ static void r8153_init(struct r8152 *tp) tp->coalesce = COALESCE_SLOW; break; } @@ -63,7 +63,7 @@ Signed-off-by: David Bauer } static void r8153b_init(struct r8152 *tp) -@@ -7127,6 +7148,8 @@ static void r8153b_init(struct r8152 *tp +@@ -7129,6 +7150,8 @@ static void r8153b_init(struct r8152 *tp rtl_tally_reset(tp); tp->coalesce = 15000; /* 15 us */ diff --git a/target/linux/generic/hack-6.0/904-debloat_dma_buf.patch b/target/linux/generic/hack-6.0/904-debloat_dma_buf.patch index 82b205a4f..6e03eb808 100644 --- a/target/linux/generic/hack-6.0/904-debloat_dma_buf.patch +++ b/target/linux/generic/hack-6.0/904-debloat_dma_buf.patch @@ -64,7 +64,7 @@ Signed-off-by: Felix Fietkau +dma-shared-buffer-objs := $(dma-buf-objs-y) --- a/drivers/dma-buf/dma-buf.c +++ b/drivers/dma-buf/dma-buf.c -@@ -1473,4 +1473,5 @@ static void __exit dma_buf_deinit(void) +@@ -1578,4 +1578,5 @@ static void __exit dma_buf_deinit(void) kern_unmount(dma_buf_mnt); dma_buf_uninit_sysfs_statistics(); } @@ -73,7 +73,7 @@ Signed-off-by: Felix Fietkau +MODULE_LICENSE("GPL"); --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -4293,6 +4293,7 @@ int wake_up_state(struct task_struct *p, +@@ -4319,6 +4319,7 @@ int wake_up_state(struct task_struct *p, { return try_to_wake_up(p, state, 0); } diff --git a/target/linux/generic/hack-6.0/952-add-net-conntrack-events-support-multiple-registrant.patch b/target/linux/generic/hack-6.0/952-add-net-conntrack-events-support-multiple-registrant.patch index b3cf1e0a3..8c9cd95bb 100644 --- a/target/linux/generic/hack-6.0/952-add-net-conntrack-events-support-multiple-registrant.patch +++ b/target/linux/generic/hack-6.0/952-add-net-conntrack-events-support-multiple-registrant.patch @@ -94,7 +94,7 @@ Signed-off-by: Zhi Chen #ifdef CONFIG_NF_CONNTRACK_EVENTS --- a/include/net/netns/conntrack.h +++ b/include/net/netns/conntrack.h -@@ -107,6 +107,9 @@ struct netns_ct { +@@ -106,6 +106,9 @@ struct netns_ct { u8 sysctl_checksum; struct ip_conntrack_stat __percpu *stat; @@ -123,8 +123,8 @@ Signed-off-by: Zhi Chen depends on NETFILTER_ADVANCED --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c -@@ -2802,6 +2802,10 @@ int nf_conntrack_init_net(struct net *ne - nf_conntrack_helper_pernet_init(net); +@@ -2803,6 +2803,10 @@ int nf_conntrack_init_net(struct net *ne + nf_conntrack_ecache_pernet_init(net); nf_conntrack_proto_pernet_init(net); +#ifdef CONFIG_NF_CONNTRACK_CHAIN_EVENTS @@ -319,7 +319,7 @@ Signed-off-by: Zhi Chen struct nf_conn *ct = item->ct; struct sk_buff *skb; unsigned int type; -@@ -3791,11 +3798,17 @@ static int ctnetlink_stat_exp_cpu(struct +@@ -3745,11 +3752,17 @@ static int ctnetlink_stat_exp_cpu(struct } #ifdef CONFIG_NF_CONNTRACK_EVENTS @@ -337,7 +337,7 @@ Signed-off-by: Zhi Chen static const struct nfnl_callback ctnl_cb[IPCTNL_MSG_MAX] = { [IPCTNL_MSG_CT_NEW] = { -@@ -3894,8 +3907,12 @@ static int __net_init ctnetlink_net_init +@@ -3848,8 +3861,12 @@ static int __net_init ctnetlink_net_init static void ctnetlink_net_pre_exit(struct net *net) { #ifdef CONFIG_NF_CONNTRACK_EVENTS diff --git a/target/linux/generic/hack-6.0/953-net-patch-linux-kernel-to-support-shortcut-fe.patch b/target/linux/generic/hack-6.0/953-net-patch-linux-kernel-to-support-shortcut-fe.patch index 888861364..95fbdfc28 100644 --- a/target/linux/generic/hack-6.0/953-net-patch-linux-kernel-to-support-shortcut-fe.patch +++ b/target/linux/generic/hack-6.0/953-net-patch-linux-kernel-to-support-shortcut-fe.patch @@ -12,9 +12,9 @@ struct list_head *br_ip_list); --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h -@@ -1146,6 +1146,10 @@ struct sk_buff { - __u8 slow_gro:1; +@@ -979,6 +979,10 @@ struct sk_buff { __u8 csum_not_inet:1; + __u8 scm_io_uring:1; +#ifdef CONFIG_SHORTCUT_FE + __u8 fast_forwarded:1; diff --git a/target/linux/generic/pending-6.0/655-increase_skb_pad.patch b/target/linux/generic/pending-6.0/655-increase_skb_pad.patch index bbf681d92..b117a3e61 100644 --- a/target/linux/generic/pending-6.0/655-increase_skb_pad.patch +++ b/target/linux/generic/pending-6.0/655-increase_skb_pad.patch @@ -9,7 +9,7 @@ Signed-off-by: Felix Fietkau --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h -@@ -2982,7 +2982,7 @@ static inline int pskb_network_may_pull( +@@ -2984,7 +2984,7 @@ static inline int pskb_network_may_pull( * NET_IP_ALIGN(2) + ethernet_header(14) + IP_header(20/40) + ports(8) */ #ifndef NET_SKB_PAD diff --git a/target/linux/generic/pending-6.0/680-NET-skip-GRO-for-foreign-MAC-addresses.patch b/target/linux/generic/pending-6.0/680-NET-skip-GRO-for-foreign-MAC-addresses.patch index 24f0f4153..a285b1e7b 100644 --- a/target/linux/generic/pending-6.0/680-NET-skip-GRO-for-foreign-MAC-addresses.patch +++ b/target/linux/generic/pending-6.0/680-NET-skip-GRO-for-foreign-MAC-addresses.patch @@ -22,7 +22,7 @@ Signed-off-by: Felix Fietkau #endif --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h -@@ -955,6 +955,7 @@ struct sk_buff { +@@ -956,6 +956,7 @@ struct sk_buff { #ifdef CONFIG_IPV6_NDISC_NODETYPE __u8 ndisc_nodetype:2; #endif diff --git a/target/linux/rockchip/patches-6.0/106-rockchip-rock-pi-4.patch b/target/linux/rockchip/patches-6.0/106-rockchip-rock-pi-4.patch index f13f5e250..c427c1c3a 100644 --- a/target/linux/rockchip/patches-6.0/106-rockchip-rock-pi-4.patch +++ b/target/linux/rockchip/patches-6.0/106-rockchip-rock-pi-4.patch @@ -9,7 +9,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-hugsun-x99.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-khadas-edge.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-khadas-edge-captain.dtb -@@ -46,6 +48,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-pi +@@ -46,6 +48,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-pu dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-roc-pc.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-roc-pc-mezzanine.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-roc-pc-plus.dtb diff --git a/target/linux/rockchip/patches-6.0/108-net-phy-add-support-for-Motorcomm-yt8531C-phy.patch b/target/linux/rockchip/patches-6.0/108-net-phy-add-support-for-Motorcomm-yt8531C-phy.patch index efb70f8a2..66dc89728 100644 --- a/target/linux/rockchip/patches-6.0/108-net-phy-add-support-for-Motorcomm-yt8531C-phy.patch +++ b/target/linux/rockchip/patches-6.0/108-net-phy-add-support-for-Motorcomm-yt8531C-phy.patch @@ -62,7 +62,7 @@ Signed-off-by: Furkan Kardame static int yt8511_read_page(struct phy_device *phydev) { return __phy_read(phydev, YT8511_PAGE_SELECT); -@@ -111,6 +145,51 @@ static int yt8511_config_init(struct phy_device *phydev) +@@ -111,6 +144,51 @@ err_restore_page: return phy_restore_page(phydev, oldpage, ret); } @@ -114,7 +114,7 @@ Signed-off-by: Furkan Kardame static struct phy_driver motorcomm_phy_drvs[] = { { PHY_ID_MATCH_EXACT(PHY_ID_YT8511), -@@ -120,7 +200,16 @@ static struct phy_driver motorcomm_phy_drvs[] = { +@@ -120,7 +198,16 @@ static struct phy_driver motorcomm_phy_d .resume = genphy_resume, .read_page = yt8511_read_page, .write_page = yt8511_write_page, @@ -131,7 +131,7 @@ Signed-off-by: Furkan Kardame }; module_phy_driver(motorcomm_phy_drvs); -@@ -131,6 +220,7 @@ MODULE_LICENSE("GPL"); +@@ -131,6 +218,7 @@ MODULE_LICENSE("GPL"); static const struct mdio_device_id __maybe_unused motorcomm_tbl[] = { { PHY_ID_MATCH_EXACT(PHY_ID_YT8511) }, diff --git a/target/linux/rockchip/patches-6.0/182-crypto-rockchip-add-myself-as-maintainer.patch b/target/linux/rockchip/patches-6.0/182-crypto-rockchip-add-myself-as-maintainer.patch index 90a5a8626..adab9faa6 100644 --- a/target/linux/rockchip/patches-6.0/182-crypto-rockchip-add-myself-as-maintainer.patch +++ b/target/linux/rockchip/patches-6.0/182-crypto-rockchip-add-myself-as-maintainer.patch @@ -14,7 +14,7 @@ Signed-off-by: Corentin Labbe --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -17570,6 +17570,13 @@ F: Documentation/ABI/*/sysfs-driver-hid- +@@ -17569,6 +17569,13 @@ F: Documentation/ABI/*/sysfs-driver-hid- F: drivers/hid/hid-roccat* F: include/linux/hid-roccat* diff --git a/target/linux/rockchip/patches-6.0/203-MAINTAINERS-add-new-dt-binding-doc-to-the-right-entr.patch b/target/linux/rockchip/patches-6.0/203-MAINTAINERS-add-new-dt-binding-doc-to-the-right-entr.patch index 9e9e2b88b..a52394500 100644 --- a/target/linux/rockchip/patches-6.0/203-MAINTAINERS-add-new-dt-binding-doc-to-the-right-entr.patch +++ b/target/linux/rockchip/patches-6.0/203-MAINTAINERS-add-new-dt-binding-doc-to-the-right-entr.patch @@ -12,7 +12,7 @@ Signed-off-by: Corentin Labbe --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -17575,6 +17575,7 @@ M: Corentin Labbe +@@ -17574,6 +17574,7 @@ M: Corentin Labbe L: linux-crypto@vger.kernel.org S: Maintained F: Documentation/devicetree/bindings/crypto/rockchip,rk3288-crypto.yaml diff --git a/target/linux/rockchip/patches-6.0/211-rockchip-rk3399-add-support-for-Rongpin-King3399.patch b/target/linux/rockchip/patches-6.0/211-rockchip-rk3399-add-support-for-Rongpin-King3399.patch old mode 100755 new mode 100644 index f3fed81a4..4fe267b51 --- a/target/linux/rockchip/patches-6.0/211-rockchip-rk3399-add-support-for-Rongpin-King3399.patch +++ b/target/linux/rockchip/patches-6.0/211-rockchip-rk3399-add-support-for-Rongpin-King3399.patch @@ -1,10 +1,10 @@ --- a/arch/arm64/boot/dts/rockchip/Makefile +++ b/arch/arm64/boot/dts/rockchip/Makefile -@@ -58,6 +58,7 @@ +@@ -55,6 +55,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-ro dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rock-pi-4b.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rock-pi-4b-plus.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rock-pi-4c.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-king3399.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rock960.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rockpro64-v2.dtb - dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rockpro64.dtb \ No newline at end of file + dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rockpro64.dtb diff --git a/target/linux/rockchip/patches-6.0/300-rockchip-rk356x-add-support-for-new-boards.patch b/target/linux/rockchip/patches-6.0/300-rockchip-rk356x-add-support-for-new-boards.patch index b242c9824..05f8bc7d4 100644 --- a/target/linux/rockchip/patches-6.0/300-rockchip-rk356x-add-support-for-new-boards.patch +++ b/target/linux/rockchip/patches-6.0/300-rockchip-rk356x-add-support-for-new-boards.patch @@ -1,6 +1,6 @@ --- a/arch/arm64/boot/dts/rockchip/Makefile +++ b/arch/arm64/boot/dts/rockchip/Makefile -@@ -73,3 +73,9 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-sa +@@ -71,3 +71,9 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-so dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-bpi-r2-pro.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-evb1-v10.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-rock-3a.dtb diff --git a/target/linux/rockchip/patches-6.0/802-arm64-dts-rockchip-add-hardware-random-number-genera.patch b/target/linux/rockchip/patches-6.0/802-arm64-dts-rockchip-add-hardware-random-number-genera.patch index 6c0b15849..0b2b93c7d 100644 --- a/target/linux/rockchip/patches-6.0/802-arm64-dts-rockchip-add-hardware-random-number-genera.patch +++ b/target/linux/rockchip/patches-6.0/802-arm64-dts-rockchip-add-hardware-random-number-genera.patch @@ -31,7 +31,7 @@ Signed-off-by: wevsty reg = <0x0 0xff100000 0x0 0x1000>; --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi -@@ -2042,6 +2042,16 @@ +@@ -2062,6 +2062,16 @@ }; }; @@ -50,8 +50,8 @@ Signed-off-by: wevsty reg = <0x0 0xff9a0000 0x0 0x10000>; --- a/arch/arm64/boot/dts/rockchip/rk3568.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3568.dtsi -@@ -211,6 +211,16 @@ - }; +@@ -225,6 +225,16 @@ + status = "okay"; }; + rng: rng@fe388000 { diff --git a/target/linux/rockchip/patches-6.0/803-PM-devfreq-rockchip-add-devfreq-driver-for-rk3328-dmc.patch b/target/linux/rockchip/patches-6.0/803-PM-devfreq-rockchip-add-devfreq-driver-for-rk3328-dmc.patch index bf2533347..d85cd1ce3 100644 --- a/target/linux/rockchip/patches-6.0/803-PM-devfreq-rockchip-add-devfreq-driver-for-rk3328-dmc.patch +++ b/target/linux/rockchip/patches-6.0/803-PM-devfreq-rockchip-add-devfreq-driver-for-rk3328-dmc.patch @@ -13,7 +13,7 @@ Signed-off-by: hmz007 --- a/drivers/devfreq/Kconfig +++ b/drivers/devfreq/Kconfig -@@ -130,6 +130,18 @@ config ARM_TEGRA_DEVFREQ +@@ -130,6 +130,18 @@ config ARM_MEDIATEK_CCI_DEVFREQ buck voltages and update a proper CCI frequency. Use the notification to get the regulator status. @@ -34,7 +34,7 @@ Signed-off-by: hmz007 depends on (ARCH_ROCKCHIP && HAVE_ARM_SMCCC) || \ --- a/drivers/devfreq/Makefile +++ b/drivers/devfreq/Makefile -@@ -12,6 +12,7 @@ obj-$(CONFIG_DEVFREQ_GOV_PASSIVE) += gov +@@ -12,6 +12,7 @@ obj-$(CONFIG_ARM_EXYNOS_BUS_DEVFREQ) += obj-$(CONFIG_ARM_IMX_BUS_DEVFREQ) += imx-bus.o obj-$(CONFIG_ARM_IMX8M_DDRC_DEVFREQ) += imx8m-ddrc.o obj-$(CONFIG_ARM_MEDIATEK_CCI_DEVFREQ) += mtk-cci-devfreq.o diff --git a/target/linux/rockchip/patches-6.0/992-rockchip-rk3399-overclock-to-2.2-1.8-GHz.patch b/target/linux/rockchip/patches-6.0/992-rockchip-rk3399-overclock-to-2.2-1.8-GHz.patch index 9090e96dc..ee8527a2f 100644 --- a/target/linux/rockchip/patches-6.0/992-rockchip-rk3399-overclock-to-2.2-1.8-GHz.patch +++ b/target/linux/rockchip/patches-6.0/992-rockchip-rk3399-overclock-to-2.2-1.8-GHz.patch @@ -28,7 +28,7 @@ Signed-off-by: Tianling Shen + }; }; - cluster1_opp: opp-table1 { + cluster1_opp: opp-table-1 { @@ -72,6 +80,14 @@ opp-hz = /bits/ 64 <1800000000>; opp-microvolt = <1200000 1200000 1250000>; @@ -43,4 +43,4 @@ Signed-off-by: Tianling Shen + }; }; - gpu_opp_table: opp-table2 { + gpu_opp_table: opp-table-2 { diff --git a/target/linux/x86/patches-6.0/800-add-rts5139.patch b/target/linux/x86/patches-6.0/800-add-rts5139.patch index 4a0836046..aa0efa5fb 100644 --- a/target/linux/x86/patches-6.0/800-add-rts5139.patch +++ b/target/linux/x86/patches-6.0/800-add-rts5139.patch @@ -1,14 +1,21 @@ ---- a/drivers/staging/Kconfig -+++ b/drivers/staging/Kconfig -@@ -40,2 +40,4 @@ - -+source "drivers/staging/rts5139/Kconfig" -+ - source "drivers/staging/rts5208/Kconfig" - ---- a/drivers/staging/Makefile -+++ b/drivers/staging/Makefile -@@ -11,2 +11,3 @@ - obj-$(CONFIG_R8188EU) += r8188eu/ -+obj-$(CONFIG_RTS5139) += rts5139/ - obj-$(CONFIG_RTS5208) += rts5208/ +--- a/drivers/staging/Kconfig ++++ b/drivers/staging/Kconfig +@@ -38,6 +38,8 @@ source "drivers/staging/rtl8712/Kconfig" + + source "drivers/staging/r8188eu/Kconfig" + ++source "drivers/staging/rts5139/Kconfig" ++ + source "drivers/staging/rts5208/Kconfig" + + source "drivers/staging/octeon/Kconfig" +--- a/drivers/staging/Makefile ++++ b/drivers/staging/Makefile +@@ -9,6 +9,7 @@ obj-$(CONFIG_RTL8192E) += rtl8192e/ + obj-$(CONFIG_RTL8723BS) += rtl8723bs/ + obj-$(CONFIG_R8712U) += rtl8712/ + obj-$(CONFIG_R8188EU) += r8188eu/ ++obj-$(CONFIG_RTS5139) += rts5139/ + obj-$(CONFIG_RTS5208) += rts5208/ + obj-$(CONFIG_OCTEON_ETHERNET) += octeon/ + obj-$(CONFIG_VT6655) += vt6655/