kernel: bump 6.0 to 6.0.3 (#10299)

All patches automatically rebased.

Signed-off-by: Liu Linhui <liulinhui36@gmail.com>
This commit is contained in:
lovehackintosh 2022-10-22 21:29:51 +08:00 committed by GitHub
parent 6c4e5d7b47
commit 4fef020048
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
32 changed files with 198 additions and 373 deletions

View File

@ -1,2 +1,2 @@
LINUX_VERSION-6.0 = .2 LINUX_VERSION-6.0 = .3
LINUX_KERNEL_HASH-6.0.2 = a13c26388cacccb684cd9f51109596a280c8186b7e95174d31ee7c5718e95c9d LINUX_KERNEL_HASH-6.0.3 = b0d522241805794d8af3a67d331ba063a16496c6fb6d365d48f7ed78ee1c3dcf

View File

@ -44,11 +44,9 @@ Change-Id: Ib49b44fb56df3333a2ff1fcc496fb1980b976e7a
mm/memory.c | 14 +------------- mm/memory.c | 14 +-------------
4 files changed, 19 insertions(+), 29 deletions(-) 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 --- a/arch/arm64/include/asm/pgtable.h
+++ b/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 * page after fork() + CoW for pfn mappings. We don't always have a
* hardware-managed access flag on arm64. * hardware-managed access flag on arm64.
*/ */
@ -75,11 +73,9 @@ index b5df82aa99e6..71a1af42f0e8 100644
static inline bool pud_sect_supported(void) 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 --- a/arch/x86/include/asm/pgtable.h
+++ b/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); return boot_cpu_has_bug(X86_BUG_L1TF);
} }
@ -93,11 +89,9 @@ index 44e2d6f1dbaa..dc5f7d8ef68a 100644
} }
#ifdef CONFIG_PAGE_TABLE_CHECK #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 --- a/include/linux/pgtable.h
+++ b/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 /* CONFIG_TRANSPARENT_HUGEPAGE */
#endif #endif
@ -117,8 +111,6 @@ index 014ee8f0fbaa..95f408df4695 100644
#ifndef __HAVE_ARCH_PTEP_GET_AND_CLEAR #ifndef __HAVE_ARCH_PTEP_GET_AND_CLEAR
static inline pte_t ptep_get_and_clear(struct mm_struct *mm, static inline pte_t ptep_get_and_clear(struct mm_struct *mm,
unsigned long address, unsigned long address,
diff --git a/mm/memory.c b/mm/memory.c
index a78814413ac0..68294ce1cb06 100644
--- a/mm/memory.c --- a/mm/memory.c
+++ b/mm/memory.c +++ b/mm/memory.c
@@ -125,18 +125,6 @@ int randomize_va_space __read_mostly = @@ -125,18 +125,6 @@ int randomize_va_space __read_mostly =
@ -140,7 +132,7 @@ index a78814413ac0..68294ce1cb06 100644
#ifndef arch_wants_old_prefaulted_pte #ifndef arch_wants_old_prefaulted_pte
static inline bool arch_wants_old_prefaulted_pte(void) 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 * On architectures with software "accessed" bits, we would
* take a double page fault, so mark it accessed here. * take a double page fault, so mark it accessed here.
*/ */
@ -149,6 +141,3 @@ index a78814413ac0..68294ce1cb06 100644
pte_t entry; pte_t entry;
vmf->pte = pte_offset_map_lock(mm, vmf->pmd, addr, &vmf->ptl); vmf->pte = pte_offset_map_lock(mm, vmf->pmd, addr, &vmf->ptl);
--
2.17.1

View File

@ -50,8 +50,6 @@ Change-Id: I1a17be3ae926f721f7b17ea1539e5c39e8c4f9a8
include/linux/pgtable.h | 4 ++-- include/linux/pgtable.h | 4 ++--
5 files changed, 17 insertions(+), 4 deletions(-) 5 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/arch/Kconfig b/arch/Kconfig
index 8b311e400ec1..bf19a84fffa2 100644
--- a/arch/Kconfig --- a/arch/Kconfig
+++ b/arch/Kconfig +++ b/arch/Kconfig
@@ -1418,6 +1418,14 @@ config DYNAMIC_SIGFRAME @@ -1418,6 +1418,14 @@ config DYNAMIC_SIGFRAME
@ -69,8 +67,6 @@ index 8b311e400ec1..bf19a84fffa2 100644
source "kernel/gcov/Kconfig" source "kernel/gcov/Kconfig"
source "scripts/gcc-plugins/Kconfig" source "scripts/gcc-plugins/Kconfig"
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index f9920f1341c8..674d694a665e 100644
--- a/arch/x86/Kconfig --- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig +++ b/arch/x86/Kconfig
@@ -85,6 +85,7 @@ config X86 @@ -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_UACCESS_FLUSHCACHE if X86_64
select ARCH_HAS_COPY_MC if X86_64 select ARCH_HAS_COPY_MC if X86_64
select ARCH_HAS_SET_MEMORY 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 --- a/arch/x86/include/asm/pgtable.h
+++ b/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) 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) 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 --- a/arch/x86/mm/pgtable.c
+++ b/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; return ret;
} }
@ -108,7 +100,7 @@ index a932d7712d85..8525f2876fb4 100644
int pmdp_test_and_clear_young(struct vm_area_struct *vma, int pmdp_test_and_clear_young(struct vm_area_struct *vma,
unsigned long addr, pmd_t *pmdp) 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; return ret;
} }
@ -118,11 +110,9 @@ index a932d7712d85..8525f2876fb4 100644
int pudp_test_and_clear_young(struct vm_area_struct *vma, int pudp_test_and_clear_young(struct vm_area_struct *vma,
unsigned long addr, pud_t *pudp) 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 --- a/include/linux/pgtable.h
+++ b/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 #endif
#ifndef __HAVE_ARCH_PMDP_TEST_AND_CLEAR_YOUNG #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, static inline int pmdp_test_and_clear_young(struct vm_area_struct *vma,
unsigned long address, unsigned long address,
pmd_t *pmdp) 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(); BUILD_BUG();
return 0; return 0;
} }
@ -140,6 +130,3 @@ index 95f408df4695..d9095251bffd 100644
#endif #endif
#ifndef __HAVE_ARCH_PTEP_CLEAR_YOUNG_FLUSH #ifndef __HAVE_ARCH_PTEP_CLEAR_YOUNG_FLUSH
--
2.17.1

View File

@ -29,8 +29,6 @@ Change-Id: Iae734b5b4030205b7db6e8c841f747b6f6ae1a04
mm/vmscan.c | 198 +++++++++++++++++++++++++++------------------------- mm/vmscan.c | 198 +++++++++++++++++++++++++++-------------------------
1 file changed, 104 insertions(+), 94 deletions(-) 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 --- a/mm/vmscan.c
+++ b/mm/vmscan.c +++ b/mm/vmscan.c
@@ -2728,6 +2728,109 @@ enum scan_balance { @@ -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 * Determine how aggressively the anon and file LRU lists should be
* scanned. * 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; unsigned long nr_reclaimed, nr_scanned;
struct lruvec *target_lruvec; struct lruvec *target_lruvec;
bool reclaimable = false; bool reclaimable = false;
@ -254,6 +252,3 @@ index 382dbe97329f..4e4331367db9 100644
shrink_node_memcgs(pgdat, sc); shrink_node_memcgs(pgdat, sc);
--
2.17.1

View File

@ -32,11 +32,9 @@ Change-Id: I6155c407d50199a43b179c7f45904d4b7c052118
include/linux/mm_inline.h | 9 ++++++++- include/linux/mm_inline.h | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-) 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 --- a/include/linux/mm_inline.h
+++ b/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)); return folio_is_file_lru(page_folio(page));
} }
@ -45,7 +43,7 @@ index 7b25b53c474a..fb8aadb81cd6 100644
enum lru_list lru, enum zone_type zid, enum lru_list lru, enum zone_type zid,
long nr_pages) 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_lruvec_state(lruvec, NR_LRU_BASE + lru, nr_pages);
__mod_zone_page_state(&pgdat->node_zones[zid], __mod_zone_page_state(&pgdat->node_zones[zid],
NR_ZONE_LRU_BASE + lru, nr_pages); NR_ZONE_LRU_BASE + lru, nr_pages);
@ -59,6 +57,3 @@ index 7b25b53c474a..fb8aadb81cd6 100644
#ifdef CONFIG_MEMCG #ifdef CONFIG_MEMCG
mem_cgroup_update_lru_size(lruvec, lru, zid, nr_pages); mem_cgroup_update_lru_size(lruvec, lru, zid, nr_pages);
#endif #endif
--
2.17.1

View File

@ -100,11 +100,9 @@ Change-Id: I71de7cd15b8dfa6f9fdd838023474693c4fee0a7
mm/vmscan.c | 75 +++++++++++++ mm/vmscan.c | 75 +++++++++++++
15 files changed, 424 insertions(+), 14 deletions(-) 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 --- a/fs/fuse/dev.c
+++ b/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_active |
1 << PG_workingset | 1 << PG_workingset |
1 << PG_reclaim | 1 << PG_reclaim |
@ -114,11 +112,9 @@ index 51897427a534..b4a6e0a1b945 100644
dump_page(page, "fuse: trying to steal weird page"); dump_page(page, "fuse: trying to steal weird page");
return 1; 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 --- a/include/linux/mm_inline.h
+++ b/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); 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_lruvec_state(lruvec, NR_LRU_BASE + lru, nr_pages);
__mod_zone_page_state(&pgdat->node_zones[zid], __mod_zone_page_state(&pgdat->node_zones[zid],
NR_ZONE_LRU_BASE + lru, nr_pages); 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; return lru;
} }
@ -306,7 +302,7 @@ index fb8aadb81cd6..2ff703900fd0 100644
update_lru_size(lruvec, lru, folio_zonenum(folio), update_lru_size(lruvec, lru, folio_zonenum(folio),
folio_nr_pages(folio)); folio_nr_pages(folio));
if (lru != LRU_UNEVICTABLE) 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); enum lru_list lru = folio_lru_list(folio);
@ -316,7 +312,7 @@ index fb8aadb81cd6..2ff703900fd0 100644
update_lru_size(lruvec, lru, folio_zonenum(folio), update_lru_size(lruvec, lru, folio_zonenum(folio),
folio_nr_pages(folio)); folio_nr_pages(folio));
/* This is not expected to be used on LRU_UNEVICTABLE */ /* 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); enum lru_list lru = folio_lru_list(folio);
@ -326,8 +322,6 @@ index fb8aadb81cd6..2ff703900fd0 100644
if (lru != LRU_UNEVICTABLE) if (lru != LRU_UNEVICTABLE)
list_del(&folio->lru); list_del(&folio->lru);
update_lru_size(lruvec, lru, folio_zonenum(folio), 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 --- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h +++ b/include/linux/mmzone.h
@@ -314,6 +314,102 @@ enum lruvec_flags { @@ -314,6 +314,102 @@ enum lruvec_flags {
@ -444,7 +438,7 @@ index e24b40c52468..1abb6d38ed86 100644
#ifdef CONFIG_MEMCG #ifdef CONFIG_MEMCG
struct pglist_data *pgdat; struct pglist_data *pgdat;
#endif #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 ZONES_PGOFF (NODES_PGOFF - ZONES_WIDTH)
#define LAST_CPUPID_PGOFF (ZONES_PGOFF - LAST_CPUPID_WIDTH) #define LAST_CPUPID_PGOFF (ZONES_PGOFF - LAST_CPUPID_WIDTH)
#define KASAN_TAG_PGOFF (LAST_CPUPID_PGOFF - KASAN_TAG_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 * 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 --- a/include/linux/page-flags-layout.h
+++ b/include/linux/page-flags-layout.h +++ b/include/linux/page-flags-layout.h
@@ -55,7 +55,8 @@ @@ -55,7 +55,8 @@
@ -493,11 +485,9 @@ index ef1e3e736e14..240905407a18 100644
+ +
#endif #endif
#endif /* _LINUX_PAGE_FLAGS_LAYOUT */ #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 --- a/include/linux/page-flags.h
+++ b/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_private | 1UL << PG_private_2 | \
1UL << PG_writeback | 1UL << PG_reserved | \ 1UL << PG_writeback | 1UL << PG_reserved | \
1UL << PG_slab | 1UL << PG_active | \ 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. * 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. * alloc-free cycle to prevent from reusing the page.
*/ */
#define PAGE_FLAGS_CHECK_AT_PREP \ #define PAGE_FLAGS_CHECK_AT_PREP \
@ -515,8 +505,6 @@ index 465ff35a8c00..0b0ae5084e60 100644
#define PAGE_FLAGS_PRIVATE \ #define PAGE_FLAGS_PRIVATE \
(1UL << PG_private | 1UL << PG_private_2) (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 --- a/include/linux/sched.h
+++ b/include/linux/sched.h +++ b/include/linux/sched.h
@@ -914,6 +914,10 @@ struct task_struct { @@ -914,6 +914,10 @@ struct task_struct {
@ -530,8 +518,6 @@ index e7b2f8a5c711..8cc46a789193 100644
#ifdef CONFIG_COMPAT_BRK #ifdef CONFIG_COMPAT_BRK
unsigned brk_randomized:1; unsigned brk_randomized:1;
#endif #endif
diff --git a/kernel/bounds.c b/kernel/bounds.c
index 9795d75b09b2..5ee60777d8e4 100644
--- a/kernel/bounds.c --- a/kernel/bounds.c
+++ b/kernel/bounds.c +++ b/kernel/bounds.c
@@ -22,6 +22,11 @@ int main(void) @@ -22,6 +22,11 @@ int main(void)
@ -546,8 +532,6 @@ index 9795d75b09b2..5ee60777d8e4 100644
/* End of constants */ /* End of constants */
return 0; return 0;
diff --git a/mm/Kconfig b/mm/Kconfig
index 0331f1461f81..d95f07cd6dcf 100644
--- a/mm/Kconfig --- a/mm/Kconfig
+++ b/mm/Kconfig +++ b/mm/Kconfig
@@ -1124,6 +1124,14 @@ config PTE_MARKER_UFFD_WP @@ -1124,6 +1124,14 @@ config PTE_MARKER_UFFD_WP
@ -565,11 +549,9 @@ index 0331f1461f81..d95f07cd6dcf 100644
source "mm/damon/Kconfig" source "mm/damon/Kconfig"
endmenu endmenu
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index f42bb51e023a..79e0b08b4cf9 100644
--- a/mm/huge_memory.c --- a/mm/huge_memory.c
+++ b/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 #ifdef CONFIG_64BIT
(1L << PG_arch_2) | (1L << PG_arch_2) |
#endif #endif
@ -579,11 +561,9 @@ index f42bb51e023a..79e0b08b4cf9 100644
/* ->mapping in first tail page is compound_mapcount */ /* ->mapping in first tail page is compound_mapcount */
VM_BUG_ON_PAGE(tail > 2 && page_tail->mapping != TAIL_MAPPING, 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 --- a/mm/memcontrol.c
+++ b/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) static void mem_cgroup_free(struct mem_cgroup *memcg)
{ {
@ -591,7 +571,7 @@ index b69979c9ced5..5fd38d12149c 100644
memcg_wb_domain_exit(memcg); memcg_wb_domain_exit(memcg);
__mem_cgroup_free(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; memcg->deferred_split_queue.split_queue_len = 0;
#endif #endif
idr_replace(&mem_cgroup_idr, memcg, memcg->id.id); idr_replace(&mem_cgroup_idr, memcg, memcg->id.id);
@ -599,11 +579,9 @@ index b69979c9ced5..5fd38d12149c 100644
return memcg; return memcg;
fail: fail:
mem_cgroup_id_remove(memcg); mem_cgroup_id_remove(memcg);
diff --git a/mm/memory.c b/mm/memory.c
index 68294ce1cb06..cd1b5bfd9f3e 100644
--- a/mm/memory.c --- a/mm/memory.c
+++ b/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); 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 * 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) if (flags & FAULT_FLAG_USER)
mem_cgroup_enter_user_fault(); mem_cgroup_enter_user_fault();
@ -647,11 +625,9 @@ index 68294ce1cb06..cd1b5bfd9f3e 100644
if (flags & FAULT_FLAG_USER) { if (flags & FAULT_FLAG_USER) {
mem_cgroup_exit_user_fault(); 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 --- a/mm/mm_init.c
+++ b/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); shift = 8 * sizeof(unsigned long);
width = shift - SECTIONS_WIDTH - NODES_WIDTH - ZONES_WIDTH width = shift - SECTIONS_WIDTH - NODES_WIDTH - ZONES_WIDTH
@ -670,8 +646,6 @@ index 9ddaf0e1b0ab..0d7b2bd2454a 100644
NR_PAGEFLAGS); NR_PAGEFLAGS);
mminit_dprintk(MMINIT_TRACE, "pageflags_layout_shifts", mminit_dprintk(MMINIT_TRACE, "pageflags_layout_shifts",
"Section %d Node %d Zone %d Lastcpupid %d Kasantag %d\n", "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 --- a/mm/mmzone.c
+++ b/mm/mmzone.c +++ b/mm/mmzone.c
@@ -88,6 +88,8 @@ void lruvec_init(struct lruvec *lruvec) @@ -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) #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 --- a/mm/swap.c
+++ b/mm/swap.c +++ b/mm/swap.c
@@ -484,6 +484,11 @@ void folio_add_lru(struct folio *folio) @@ -484,6 +484,11 @@ void folio_add_lru(struct folio *folio)
@ -699,7 +671,7 @@ index 9cee7f6a3809..0e423b7d458b 100644
folio_get(folio); folio_get(folio);
local_lock(&cpu_fbatches.lock); local_lock(&cpu_fbatches.lock);
fbatch = this_cpu_ptr(&cpu_fbatches.lru_add); 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) static void lru_deactivate_fn(struct lruvec *lruvec, struct folio *folio)
{ {
@ -719,11 +691,9 @@ index 9cee7f6a3809..0e423b7d458b 100644
struct folio_batch *fbatch; struct folio_batch *fbatch;
folio_get(folio); folio_get(folio);
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 4e4331367db9..fb76cfe2fdc2 100644
--- a/mm/vmscan.c --- a/mm/vmscan.c
+++ b/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); 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) static void shrink_lruvec(struct lruvec *lruvec, struct scan_control *sc)
{ {
unsigned long nr[NR_LRU_LISTS]; unsigned long nr[NR_LRU_LISTS];
--
2.17.1

View File

@ -186,11 +186,9 @@ Change-Id: Id47465f46f1f77f1e9f0be3972e380ddcfa37cc0
mm/workingset.c | 110 ++++- mm/workingset.c | 110 ++++-
8 files changed, 1025 insertions(+), 11 deletions(-) 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 --- a/include/linux/mm_inline.h
+++ b/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; return seq % MAX_NR_GENS;
} }
@ -224,7 +222,7 @@ index 2ff703900fd0..f2b2296a42f9 100644
static inline int folio_lru_gen(struct folio *folio) static inline int folio_lru_gen(struct folio *folio)
{ {
unsigned long flags = READ_ONCE(folio->flags); 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); __update_lru_size(lruvec, lru, zone, -delta);
return; return;
} }
@ -240,8 +238,6 @@ index 2ff703900fd0..f2b2296a42f9 100644
} }
static inline bool lru_gen_add_folio(struct lruvec *lruvec, struct folio *folio, bool reclaiming) 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 --- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h +++ b/include/linux/mmzone.h
@@ -347,6 +347,28 @@ enum lruvec_flags { @@ -347,6 +347,28 @@ enum lruvec_flags {
@ -306,8 +302,6 @@ index 1abb6d38ed86..07bd22149c22 100644
}; };
void lru_gen_init_lruvec(struct lruvec *lruvec); 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 --- a/include/linux/page-flags-layout.h
+++ b/include/linux/page-flags-layout.h +++ b/include/linux/page-flags-layout.h
@@ -106,7 +106,10 @@ @@ -106,7 +106,10 @@
@ -322,8 +316,6 @@ index 240905407a18..7d79818dc065 100644
#endif #endif
#endif /* _LINUX_PAGE_FLAGS_LAYOUT */ #endif /* _LINUX_PAGE_FLAGS_LAYOUT */
diff --git a/kernel/bounds.c b/kernel/bounds.c
index 5ee60777d8e4..b529182e8b04 100644
--- a/kernel/bounds.c --- a/kernel/bounds.c
+++ b/kernel/bounds.c +++ b/kernel/bounds.c
@@ -24,8 +24,10 @@ int main(void) @@ -24,8 +24,10 @@ int main(void)
@ -337,8 +329,6 @@ index 5ee60777d8e4..b529182e8b04 100644
#endif #endif
/* End of constants */ /* End of constants */
diff --git a/mm/Kconfig b/mm/Kconfig
index d95f07cd6dcf..5101dca8f21c 100644
--- a/mm/Kconfig --- a/mm/Kconfig
+++ b/mm/Kconfig +++ b/mm/Kconfig
@@ -1124,6 +1124,7 @@ config PTE_MARKER_UFFD_WP @@ -1124,6 +1124,7 @@ config PTE_MARKER_UFFD_WP
@ -366,11 +356,9 @@ index d95f07cd6dcf..5101dca8f21c 100644
source "mm/damon/Kconfig" source "mm/damon/Kconfig"
endmenu endmenu
diff --git a/mm/swap.c b/mm/swap.c
index 0e423b7d458b..f74fd51fa9e1 100644
--- a/mm/swap.c --- a/mm/swap.c
+++ b/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); local_unlock(&cpu_fbatches.lock);
} }
@ -411,7 +399,7 @@ index 0e423b7d458b..f74fd51fa9e1 100644
/* /*
* Mark a page as having seen activity. * 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) void folio_mark_accessed(struct folio *folio)
{ {
@ -423,11 +411,9 @@ index 0e423b7d458b..f74fd51fa9e1 100644
if (!folio_test_referenced(folio)) { if (!folio_test_referenced(folio)) {
folio_set_referenced(folio); folio_set_referenced(folio);
} else if (folio_test_unevictable(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 --- a/mm/vmscan.c
+++ b/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)) { if (folio_test_swapcache(folio)) {
swp_entry_t swap = folio_swap_entry(folio); swp_entry_t swap = folio_swap_entry(folio);
@ -440,7 +426,7 @@ index fb76cfe2fdc2..8e63f95a5f53 100644
__delete_from_swap_cache(folio, swap, shadow); __delete_from_swap_cache(folio, swap, shadow);
xa_unlock_irq(&mapping->i_pages); xa_unlock_irq(&mapping->i_pages);
put_swap_page(&folio->page, swap); 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; unsigned long file;
struct lruvec *target_lruvec; struct lruvec *target_lruvec;
@ -450,7 +436,7 @@ index fb76cfe2fdc2..8e63f95a5f53 100644
target_lruvec = mem_cgroup_lruvec(sc->target_mem_cgroup, pgdat); 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 * shorthand helpers
******************************************************************************/ ******************************************************************************/
@ -468,7 +454,7 @@ index fb76cfe2fdc2..8e63f95a5f53 100644
#define for_each_gen_type_zone(gen, type, zone) \ #define for_each_gen_type_zone(gen, type, zone) \
for ((gen) = 0; (gen) < MAX_NR_GENS; (gen)++) \ for ((gen) = 0; (gen) < MAX_NR_GENS; (gen)++) \
for ((type) = 0; (type) < ANON_AND_FILE; (type)++) \ 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; return pgdat ? &pgdat->__lruvec : NULL;
} }
@ -1231,7 +1217,7 @@ index fb76cfe2fdc2..8e63f95a5f53 100644
#endif /* CONFIG_LRU_GEN */ #endif /* CONFIG_LRU_GEN */
static void shrink_lruvec(struct lruvec *lruvec, struct scan_control *sc) 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; struct blk_plug plug;
bool scan_adjusted; bool scan_adjusted;
@ -1243,7 +1229,7 @@ index fb76cfe2fdc2..8e63f95a5f53 100644
get_scan_count(lruvec, sc, nr); get_scan_count(lruvec, sc, nr);
/* Record the original scan target for proportional adjustments later */ /* 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; struct lruvec *target_lruvec;
unsigned long refaults; unsigned long refaults;
@ -1253,7 +1239,7 @@ index fb76cfe2fdc2..8e63f95a5f53 100644
target_lruvec = mem_cgroup_lruvec(target_memcg, pgdat); target_lruvec = mem_cgroup_lruvec(target_memcg, pgdat);
refaults = lruvec_page_state(target_lruvec, WORKINGSET_ACTIVATE_ANON); refaults = lruvec_page_state(target_lruvec, WORKINGSET_ACTIVATE_ANON);
target_lruvec->refaults[0] = refaults; 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 #endif
@ -1272,7 +1258,7 @@ index fb76cfe2fdc2..8e63f95a5f53 100644
if (!can_age_anon_pages(pgdat, sc)) if (!can_age_anon_pages(pgdat, sc))
return; 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; sc.may_swap = !nr_boost_reclaim;
/* /*
@ -1289,11 +1275,9 @@ index fb76cfe2fdc2..8e63f95a5f53 100644
/* /*
* If we're getting trouble reclaiming, start doing writepage * 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 --- a/mm/workingset.c
+++ b/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, static void *pack_shadow(int memcgid, pg_data_t *pgdat, unsigned long eviction,
bool workingset) bool workingset)
{ {
@ -1301,7 +1285,7 @@ index a5e84862fc86..ae7e984b23c6 100644
eviction &= EVICTION_MASK; eviction &= EVICTION_MASK;
eviction = (eviction << MEM_CGROUP_ID_SHIFT) | memcgid; eviction = (eviction << MEM_CGROUP_ID_SHIFT) | memcgid;
eviction = (eviction << NODES_SHIFT) | pgdat->node_id; 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; *memcgidp = memcgid;
*pgdat = NODE_DATA(nid); *pgdat = NODE_DATA(nid);
@ -1410,7 +1394,7 @@ index a5e84862fc86..ae7e984b23c6 100644
/** /**
* workingset_age_nonresident - age non-resident entries as LRU ages * workingset_age_nonresident - age non-resident entries as LRU ages
* @lruvec: the lruvec that was aged * @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_ref_count(folio), folio);
VM_BUG_ON_FOLIO(!folio_test_locked(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)); workingset_age_nonresident(lruvec, folio_nr_pages(folio));
return pack_shadow(memcgid, pgdat, eviction, return pack_shadow(memcgid, pgdat, eviction,
folio_test_workingset(folio)); 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; int memcgid;
long nr; long nr;
@ -1439,6 +1423,3 @@ index a5e84862fc86..ae7e984b23c6 100644
rcu_read_lock(); rcu_read_lock();
/* /*
--
2.17.1

View File

@ -87,11 +87,9 @@ Change-Id: I4b9ca0fd20f566ce554e703f14cee3fe0048c2fd
mm/vmscan.c | 184 +++++++++++++++++++++++++++++++++++++ mm/vmscan.c | 184 +++++++++++++++++++++++++++++++++++++
8 files changed, 236 insertions(+), 2 deletions(-) 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 --- a/include/linux/memcontrol.h
+++ b/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 * - LRU isolation
* - lock_page_memcg() * - lock_page_memcg()
* - exclusive reference * - 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 * For a kmem folio a caller should hold an rcu read lock to protect memcg
* associated with a kmem folio from being released. * 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 * - LRU isolation
* - lock_page_memcg() * - lock_page_memcg()
* - exclusive reference * - 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 * For a kmem page a caller should hold an rcu read lock to protect memcg
* associated with a kmem page from being released. * 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); 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 */ /* idx can be of type enum memcg_stat_item or node_stat_item */
static inline void mod_memcg_state(struct mem_cgroup *memcg, static inline void mod_memcg_state(struct mem_cgroup *memcg,
int idx, int val) 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) 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 --- a/include/linux/mm.h
+++ b/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); return page_to_pfn(&folio->page);
} }
@ -166,8 +162,6 @@ index 21f8b27bd9fd..88976a521ef5 100644
static inline atomic_t *folio_pincount_ptr(struct folio *folio) static inline atomic_t *folio_pincount_ptr(struct folio *folio)
{ {
return &folio_page(folio, 1)->compound_pincount; 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 --- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h +++ b/include/linux/mmzone.h
@@ -372,6 +372,7 @@ enum lruvec_flags { @@ -372,6 +372,7 @@ enum lruvec_flags {
@ -186,7 +180,7 @@ index 07bd22149c22..2b4dc60d0f6c 100644
#ifdef CONFIG_MEMCG #ifdef CONFIG_MEMCG
void lru_gen_init_memcg(struct mem_cgroup *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 #ifdef CONFIG_MEMCG
static inline void lru_gen_init_memcg(struct mem_cgroup *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 --- a/mm/internal.h
+++ b/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); void folio_rotate_reclaimable(struct folio *folio);
bool __folio_end_writeback(struct folio *folio); bool __folio_end_writeback(struct folio *folio);
void deactivate_file_folio(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, void free_pgtables(struct mmu_gather *tlb, struct vm_area_struct *start_vma,
unsigned long floor, unsigned long ceiling); unsigned long floor, unsigned long ceiling);
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 5fd38d12149c..882180866e31 100644
--- a/mm/memcontrol.c --- a/mm/memcontrol.c
+++ b/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 * - LRU isolation
* - lock_page_memcg() * - lock_page_memcg()
* - exclusive reference * - exclusive reference
@ -221,11 +211,9 @@ index 5fd38d12149c..882180866e31 100644
*/ */
folio->memcg_data = (unsigned long)memcg; folio->memcg_data = (unsigned long)memcg;
} }
diff --git a/mm/rmap.c b/mm/rmap.c
index 93d5a6f793d2..9e0ce48bca08 100644
--- a/mm/rmap.c --- a/mm/rmap.c
+++ b/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) { if (pvmw.pte) {
@ -238,11 +226,9 @@ index 93d5a6f793d2..9e0ce48bca08 100644
if (ptep_clear_flush_young_notify(vma, address, if (ptep_clear_flush_young_notify(vma, address,
pvmw.pte)) { pvmw.pte)) {
/* /*
diff --git a/mm/swap.c b/mm/swap.c
index f74fd51fa9e1..0a3871a70952 100644
--- a/mm/swap.c --- a/mm/swap.c
+++ b/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); 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) && if (folio_test_lru(folio) && !folio_test_active(folio) &&
!folio_test_unevictable(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; struct lruvec *lruvec;
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 8e63f95a5f53..8686918e238d 100644
--- a/mm/vmscan.c --- a/mm/vmscan.c
+++ b/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)) if (!sc->may_unmap && folio_mapped(folio))
goto keep_locked; goto keep_locked;
@ -276,7 +260,7 @@ index 8e63f95a5f53..8686918e238d 100644
/* /*
* The number of dirty pages determines if a node is marked * The number of dirty pages determines if a node is marked
* reclaim_congested. kswapd will stall and start writing * 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 * the aging
******************************************************************************/ ******************************************************************************/
@ -306,7 +290,7 @@ index 8e63f95a5f53..8686918e238d 100644
/* protect pages accessed multiple times through file descriptors */ /* protect pages accessed multiple times through file descriptors */
static int folio_inc_gen(struct lruvec *lruvec, struct folio *folio, bool reclaiming) 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); VM_WARN_ON_ONCE_FOLIO(!(old_flags & LRU_GEN_MASK), folio);
do { do {
@ -318,7 +302,7 @@ index 8e63f95a5f53..8686918e238d 100644
new_gen = (old_gen + 1) % MAX_NR_GENS; new_gen = (old_gen + 1) % MAX_NR_GENS;
new_flags = old_flags & ~(LRU_GEN_MASK | LRU_REFS_MASK | LRU_REFS_FLAGS); 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; return new_gen;
} }
@ -362,7 +346,7 @@ index 8e63f95a5f53..8686918e238d 100644
static void inc_min_seq(struct lruvec *lruvec, int type) static void inc_min_seq(struct lruvec *lruvec, int type)
{ {
struct lru_gen_struct *lrugen = &lruvec->lrugen; 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))); } while ((memcg = mem_cgroup_iter(NULL, memcg, NULL)));
} }
@ -477,7 +461,7 @@ index 8e63f95a5f53..8686918e238d 100644
/****************************************************************************** /******************************************************************************
* the eviction * 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; return true;
} }
@ -490,6 +474,3 @@ index 8e63f95a5f53..8686918e238d 100644
/* protected */ /* protected */
if (tier > tier_idx) { if (tier > tier_idx) {
int hist = lru_hist_from_seq(lrugen->min_seq[type]); int hist = lru_hist_from_seq(lrugen->min_seq[type]);
--
2.17.1

View File

@ -124,11 +124,9 @@ Change-Id: I1065451af34154306418510c19e03ea798dc13af
mm/vmscan.c | 1008 +++++++++++++++++++++++++++++++++++- mm/vmscan.c | 1008 +++++++++++++++++++++++++++++++++++-
10 files changed, 1170 insertions(+), 17 deletions(-) 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 --- a/fs/exec.c
+++ b/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; active_mm = tsk->active_mm;
tsk->active_mm = mm; tsk->active_mm = mm;
tsk->mm = mm; tsk->mm = mm;
@ -136,7 +134,7 @@ index d046dbb9cbd0..c67b12f0f577 100644
/* /*
* This prevents preemption while active_mm is being loaded and * This prevents preemption while active_mm is being loaded and
* it and mm are being updated, which could cause problems for * 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; tsk->mm->vmacache_seqnum = 0;
vmacache_flush(tsk); vmacache_flush(tsk);
task_unlock(tsk); task_unlock(tsk);
@ -144,8 +142,6 @@ index d046dbb9cbd0..c67b12f0f577 100644
if (old_mm) { if (old_mm) {
mmap_read_unlock(old_mm); mmap_read_unlock(old_mm);
BUG_ON(active_mm != 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 --- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h
@@ -350,6 +350,11 @@ struct mem_cgroup { @@ -350,6 +350,11 @@ struct mem_cgroup {
@ -160,8 +156,6 @@ index d2b7f6b9998c..877cbcbc6ed9 100644
struct mem_cgroup_per_node *nodeinfo[]; 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 --- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h +++ b/include/linux/mm_types.h
@@ -672,6 +672,22 @@ struct mm_struct { @@ -672,6 +672,22 @@ struct mm_struct {
@ -187,7 +181,7 @@ index cf97f3884fda..e1797813cc2c 100644
} __randomize_layout; } __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; return (struct cpumask *)&mm->cpu_bitmap;
} }
@ -254,8 +248,6 @@ index cf97f3884fda..e1797813cc2c 100644
struct mmu_gather; struct mmu_gather;
extern void tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm); 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); 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 --- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h +++ b/include/linux/mmzone.h
@@ -405,7 +405,7 @@ enum { @@ -405,7 +405,7 @@ enum {
@ -342,8 +334,6 @@ index 2b4dc60d0f6c..e5cf37dc41a4 100644
ZONE_PADDING(_pad2_) ZONE_PADDING(_pad2_)
/* Per-node vmstats */ /* Per-node vmstats */
diff --git a/include/linux/swap.h b/include/linux/swap.h
index 43150b9bbc5c..6308150b234a 100644
--- a/include/linux/swap.h --- a/include/linux/swap.h
+++ b/include/linux/swap.h +++ b/include/linux/swap.h
@@ -162,6 +162,10 @@ union swap_header { @@ -162,6 +162,10 @@ union swap_header {
@ -357,11 +347,9 @@ index 43150b9bbc5c..6308150b234a 100644
}; };
#ifdef __KERNEL__ #ifdef __KERNEL__
diff --git a/kernel/exit.c b/kernel/exit.c
index 84021b24f79e..98a33bd7c25c 100644
--- a/kernel/exit.c --- a/kernel/exit.c
+++ b/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; goto retry;
} }
WRITE_ONCE(mm->owner, c); WRITE_ONCE(mm->owner, c);
@ -369,11 +357,9 @@ index 84021b24f79e..98a33bd7c25c 100644
task_unlock(c); task_unlock(c);
put_task_struct(c); put_task_struct(c);
} }
diff --git a/kernel/fork.c b/kernel/fork.c
index 2b6bd511c6ed..2dd4ca002a36 100644
--- a/kernel/fork.c --- a/kernel/fork.c
+++ b/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; goto fail_nocontext;
mm->user_ns = get_user_ns(user_ns); mm->user_ns = get_user_ns(user_ns);
@ -381,7 +367,7 @@ index 2b6bd511c6ed..2dd4ca002a36 100644
return mm; return mm;
fail_nocontext: 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) if (mm->binfmt)
module_put(mm->binfmt->module); module_put(mm->binfmt->module);
@ -389,7 +375,7 @@ index 2b6bd511c6ed..2dd4ca002a36 100644
mmdrop(mm); 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); get_task_struct(p);
} }
@ -403,11 +389,9 @@ index 2b6bd511c6ed..2dd4ca002a36 100644
wake_up_new_task(p); wake_up_new_task(p);
/* forking complete and child started to run, tell ptracer */ /* 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 --- a/kernel/sched/core.c
+++ b/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(). * finish_task_switch()'s mmdrop().
*/ */
switch_mm_irqs_off(prev->active_mm, next->mm, next); switch_mm_irqs_off(prev->active_mm, next->mm, next);
@ -415,8 +399,6 @@ index ee28253c9ac0..c48c0a19642b 100644
if (!prev->mm) { // from kernel if (!prev->mm) { // from kernel
/* will mmdrop() in finish_task_switch(). */ /* will mmdrop() in finish_task_switch(). */
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 882180866e31..1c18d7c1ce71 100644
--- a/mm/memcontrol.c --- a/mm/memcontrol.c
+++ b/mm/memcontrol.c +++ b/mm/memcontrol.c
@@ -6199,6 +6199,30 @@ static void mem_cgroup_move_task(void) @@ -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) static int seq_puts_memcg_tunable(struct seq_file *m, unsigned long value)
{ {
if (value == PAGE_COUNTER_MAX) 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_reset = mem_cgroup_css_reset,
.css_rstat_flush = mem_cgroup_css_rstat_flush, .css_rstat_flush = mem_cgroup_css_rstat_flush,
.can_attach = mem_cgroup_can_attach, .can_attach = mem_cgroup_can_attach,
@ -458,8 +440,6 @@ index 882180866e31..1c18d7c1ce71 100644
.cancel_attach = mem_cgroup_cancel_attach, .cancel_attach = mem_cgroup_cancel_attach,
.post_attach = mem_cgroup_move_task, .post_attach = mem_cgroup_move_task,
.dfl_cftypes = memory_files, .dfl_cftypes = memory_files,
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 8686918e238d..fcb437769a60 100644
--- a/mm/vmscan.c --- a/mm/vmscan.c
+++ b/mm/vmscan.c +++ b/mm/vmscan.c
@@ -49,6 +49,8 @@ @@ -49,6 +49,8 @@
@ -471,7 +451,7 @@ index 8686918e238d..fcb437769a60 100644
#include <asm/tlbflush.h> #include <asm/tlbflush.h>
#include <asm/div64.h> #include <asm/div64.h>
@@ -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 ((type) = 0; (type) < ANON_AND_FILE; (type)++) \
for ((zone) = 0; (zone) < MAX_NR_ZONES; (zone)++) for ((zone) = 0; (zone) < MAX_NR_ZONES; (zone)++)
@ -480,11 +460,10 @@ index 8686918e238d..fcb437769a60 100644
{ {
struct pglist_data *pgdat = NODE_DATA(nid); struct pglist_data *pgdat = NODE_DATA(nid);
@@ -3127,6 +3129,371 @@ static bool __maybe_unused seq_is_valid(struct lruvec *lruvec) @@ -3128,6 +3130,371 @@ static bool __maybe_unused seq_is_valid(
get_nr_gens(lruvec, LRU_GEN_ANON) <= MAX_NR_GENS;
} }
+/****************************************************************************** /******************************************************************************
+ * mm_struct list + * mm_struct list
+ ******************************************************************************/ + ******************************************************************************/
+ +
@ -849,10 +828,11 @@ index 8686918e238d..fcb437769a60 100644
+ return success; + return success;
+} +}
+ +
/****************************************************************************** +/******************************************************************************
* refault feedback loop * 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; 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) static unsigned long get_pte_pfn(pte_t pte, struct vm_area_struct *vma, unsigned long addr)
{ {
unsigned long pfn = pte_pfn(pte); 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; return pfn;
} }
@ -1001,7 +981,7 @@ index 8686918e238d..fcb437769a60 100644
{ {
struct folio *folio; 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) if (folio_memcg_rcu(folio) != memcg)
return NULL; return NULL;
@ -1377,7 +1357,7 @@ index 8686918e238d..fcb437769a60 100644
static void inc_min_seq(struct lruvec *lruvec, int type) static void inc_min_seq(struct lruvec *lruvec, int type)
{ {
struct lru_gen_struct *lrugen = &lruvec->lrugen; 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; return success;
} }
@ -1386,7 +1366,7 @@ index 8686918e238d..fcb437769a60 100644
{ {
int prev, next; int prev, next;
int type, zone; 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)); 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--) { for (type = ANON_AND_FILE - 1; type >= 0; type--) {
if (get_nr_gens(lruvec, type) != MAX_NR_GENS) if (get_nr_gens(lruvec, type) != MAX_NR_GENS)
continue; 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 */ /* make sure preceding modifications appear */
smp_store_release(&lrugen->max_seq, lrugen->max_seq + 1); 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, 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) 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); need_aging = should_run_aging(lruvec, max_seq, min_seq, sc, swappiness, &nr_to_scan);
if (need_aging) 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) 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()); VM_WARN_ON_ONCE(!current_is_kswapd());
@ -1490,7 +1470,7 @@ index 8686918e238d..fcb437769a60 100644
memcg = mem_cgroup_iter(NULL, NULL, NULL); memcg = mem_cgroup_iter(NULL, NULL, NULL);
do { do {
struct lruvec *lruvec = mem_cgroup_lruvec(memcg, pgdat); 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(); cond_resched();
} while ((memcg = mem_cgroup_iter(NULL, memcg, NULL))); } 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) 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 start;
unsigned long end; unsigned long end;
unsigned long addr; unsigned long addr;
@ -1517,7 +1497,7 @@ index 8686918e238d..fcb437769a60 100644
unsigned long bitmap[BITS_TO_LONGS(MIN_LRU_BATCH)] = {}; unsigned long bitmap[BITS_TO_LONGS(MIN_LRU_BATCH)] = {};
struct folio *folio = pfn_folio(pvmw->pfn); struct folio *folio = pfn_folio(pvmw->pfn);
struct mem_cgroup *memcg = folio_memcg(folio); 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)) if (spin_is_contended(pvmw->ptl))
return; return;
@ -1527,7 +1507,7 @@ index 8686918e238d..fcb437769a60 100644
start = max(pvmw->address & PMD_MASK, pvmw->vma->vm_start); start = max(pvmw->address & PMD_MASK, pvmw->vma->vm_start);
end = min(pvmw->address | ~PMD_MASK, pvmw->vma->vm_end - 1) + 1; 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])) if (!pte_young(pte[i]))
continue; continue;
@ -1544,7 +1524,7 @@ index 8686918e238d..fcb437769a60 100644
if (pte_dirty(pte[i]) && !folio_test_dirty(folio) && if (pte_dirty(pte[i]) && !folio_test_dirty(folio) &&
!(folio_test_anon(folio) && folio_test_swapbacked(folio) && !(folio_test_anon(folio) && folio_test_swapbacked(folio) &&
!folio_test_swapcache(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(); arch_leave_lazy_mmu_mode();
rcu_read_unlock(); rcu_read_unlock();
@ -1557,7 +1537,7 @@ index 8686918e238d..fcb437769a60 100644
for_each_set_bit(i, bitmap, MIN_LRU_BATCH) { for_each_set_bit(i, bitmap, MIN_LRU_BATCH) {
folio = pfn_folio(pte_pfn(pte[i])); folio = pfn_folio(pte_pfn(pte[i]));
folio_activate(folio); 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)) if (!mem_cgroup_trylock_pages(memcg))
return; return;
@ -1570,7 +1550,7 @@ index 8686918e238d..fcb437769a60 100644
for_each_set_bit(i, bitmap, MIN_LRU_BATCH) { for_each_set_bit(i, bitmap, MIN_LRU_BATCH) {
folio = pfn_folio(pte_pfn(pte[i])); 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) if (old_gen < 0 || old_gen == new_gen)
continue; continue;
@ -1587,7 +1567,7 @@ index 8686918e238d..fcb437769a60 100644
mem_cgroup_unlock_pages(); 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; struct folio *folio;
enum vm_event_item item; enum vm_event_item item;
struct reclaim_stat stat; struct reclaim_stat stat;
@ -1595,7 +1575,7 @@ index 8686918e238d..fcb437769a60 100644
struct mem_cgroup *memcg = lruvec_memcg(lruvec); struct mem_cgroup *memcg = lruvec_memcg(lruvec);
struct pglist_data *pgdat = lruvec_pgdat(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); move_pages_to_lru(lruvec, &list);
@ -1606,7 +1586,7 @@ index 8686918e238d..fcb437769a60 100644
item = current_is_kswapd() ? PGSTEAL_KSWAPD : PGSTEAL_DIRECT; item = current_is_kswapd() ? PGSTEAL_KSWAPD : PGSTEAL_DIRECT;
if (!cgroup_reclaim(sc)) if (!cgroup_reclaim(sc))
__count_vm_events(item, reclaimed); __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; return scanned;
} }
@ -1618,7 +1598,7 @@ index 8686918e238d..fcb437769a60 100644
static unsigned long get_nr_to_scan(struct lruvec *lruvec, struct scan_control *sc, static unsigned long get_nr_to_scan(struct lruvec *lruvec, struct scan_control *sc,
bool can_swap) 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()) if (current_is_kswapd())
return 0; return 0;
@ -1628,7 +1608,7 @@ index 8686918e238d..fcb437769a60 100644
done: done:
return min_seq[!can_swap] + MIN_NR_GENS <= max_seq ? nr_to_scan : 0; 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); blk_start_plug(&plug);
@ -1637,7 +1617,7 @@ index 8686918e238d..fcb437769a60 100644
while (true) { while (true) {
int delta; int delta;
int swappiness; 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(); cond_resched();
} }
@ -1646,7 +1626,7 @@ index 8686918e238d..fcb437769a60 100644
blk_finish_plug(&plug); 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) for_each_gen_type_zone(gen, type, zone)
INIT_LIST_HEAD(&lrugen->lists[gen][type][zone]); INIT_LIST_HEAD(&lrugen->lists[gen][type][zone]);
@ -1668,7 +1648,7 @@ index 8686918e238d..fcb437769a60 100644
int nid; int nid;
for_each_node(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, VM_WARN_ON_ONCE(memchr_inv(lruvec->lrugen.nr_pages, 0,
sizeof(lruvec->lrugen.nr_pages))); sizeof(lruvec->lrugen.nr_pages)));
@ -1680,6 +1660,3 @@ index 8686918e238d..fcb437769a60 100644
} }
} }
#endif #endif
--
2.17.1

View File

@ -110,8 +110,6 @@ Change-Id: I7e00e0c733437e534ac98031cf8154a681becc00
mm/vmscan.c | 104 +++++++++++++++++++++++++++++++++++++++++++++++----- mm/vmscan.c | 104 +++++++++++++++++++++++++++++++++++++++++++++++-----
1 file changed, 95 insertions(+), 9 deletions(-) 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 --- a/mm/vmscan.c
+++ b/mm/vmscan.c +++ b/mm/vmscan.c
@@ -131,6 +131,12 @@ struct scan_control { @@ -131,6 +131,12 @@ struct scan_control {
@ -127,7 +125,7 @@ index fcb437769a60..e7b74ab67973 100644
/* Allocation order */ /* Allocation order */
s8 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()); VM_WARN_ON_ONCE(!current_is_kswapd());
@ -147,7 +145,7 @@ index fcb437769a60..e7b74ab67973 100644
set_mm_walk(pgdat); set_mm_walk(pgdat);
memcg = mem_cgroup_iter(NULL, NULL, NULL); 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; return scanned;
} }
@ -157,7 +155,7 @@ index fcb437769a60..e7b74ab67973 100644
{ {
int type; int type;
int scanned; 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; sc->nr_reclaimed += reclaimed;
@ -167,7 +165,7 @@ index fcb437769a60..e7b74ab67973 100644
return scanned; 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. * reclaim.
*/ */
static unsigned long get_nr_to_scan(struct lruvec *lruvec, struct scan_control *sc, 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; unsigned long nr_to_scan;
struct mem_cgroup *memcg = lruvec_memcg(lruvec); struct mem_cgroup *memcg = lruvec_memcg(lruvec);
DEFINE_MAX_SEQ(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)) (mem_cgroup_below_low(memcg) && !sc->memcg_low_reclaim))
return 0; return 0;
@ -189,7 +187,7 @@ index fcb437769a60..e7b74ab67973 100644
return nr_to_scan; return nr_to_scan;
/* skip the aging path at the default priority */ /* 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; 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(); 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 else
swappiness = 0; swappiness = 0;
@ -290,6 +288,3 @@ index fcb437769a60..e7b74ab67973 100644
clear_mm_walk(); clear_mm_walk();
blk_finish_plug(&plug); blk_finish_plug(&plug);
--
2.17.1

View File

@ -64,11 +64,9 @@ Change-Id: I4c909618e8fed7fb1337f6624bbe542ec920a515
mm/vmscan.c | 228 +++++++++++++++++++++++++++++++- mm/vmscan.c | 228 +++++++++++++++++++++++++++++++-
6 files changed, 265 insertions(+), 9 deletions(-) 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 --- a/include/linux/cgroup.h
+++ b/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); 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_css_set_check - obtain a task's css_set with extra access conditions
* @task: the task to obtain css_set for * @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. * as locks used during the cgroup_subsys::attach() methods.
*/ */
#ifdef CONFIG_PROVE_RCU #ifdef CONFIG_PROVE_RCU
@ -104,11 +102,9 @@ index ac5d0515680e..9179463c3c9f 100644
static inline int cgroup_attach_task_all(struct task_struct *from, static inline int cgroup_attach_task_all(struct task_struct *from,
struct task_struct *t) { return 0; } struct task_struct *t) { return 0; }
static inline int cgroupstats_build(struct cgroupstats *stats, 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 --- a/include/linux/mm_inline.h
+++ b/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 #ifdef CONFIG_LRU_GEN
@ -131,7 +127,7 @@ index f2b2296a42f9..4949eda9a9a2 100644
static inline bool lru_gen_in_fault(void) 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); VM_WARN_ON_ONCE_FOLIO(gen != -1, folio);
@ -140,8 +136,6 @@ index f2b2296a42f9..4949eda9a9a2 100644
return false; return false;
/* /*
* There are three common cases for this page: * 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 --- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h +++ b/include/linux/mmzone.h
@@ -384,6 +384,13 @@ enum { @@ -384,6 +384,13 @@ enum {
@ -167,8 +161,6 @@ index e5cf37dc41a4..39bca2e420b7 100644
}; };
enum { 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 --- a/kernel/cgroup/cgroup-internal.h
+++ b/kernel/cgroup/cgroup-internal.h +++ b/kernel/cgroup/cgroup-internal.h
@@ -164,7 +164,6 @@ struct cgroup_mgctx { @@ -164,7 +164,6 @@ struct cgroup_mgctx {
@ -179,8 +171,6 @@ index 36b740cb3d59..63dc3e82be4f 100644
extern spinlock_t css_set_lock; extern spinlock_t css_set_lock;
extern struct cgroup_subsys *cgroup_subsys[]; extern struct cgroup_subsys *cgroup_subsys[];
extern struct list_head cgroup_roots; extern struct list_head cgroup_roots;
diff --git a/mm/Kconfig b/mm/Kconfig
index 5101dca8f21c..6c86849c4db9 100644
--- a/mm/Kconfig --- a/mm/Kconfig
+++ b/mm/Kconfig +++ b/mm/Kconfig
@@ -1133,6 +1133,12 @@ config LRU_GEN @@ -1133,6 +1133,12 @@ config LRU_GEN
@ -196,8 +186,6 @@ index 5101dca8f21c..6c86849c4db9 100644
config LRU_GEN_STATS config LRU_GEN_STATS
bool "Full stats for debugging" bool "Full stats for debugging"
depends on LRU_GEN depends on LRU_GEN
diff --git a/mm/vmscan.c b/mm/vmscan.c
index e7b74ab67973..ea3d497019ab 100644
--- a/mm/vmscan.c --- a/mm/vmscan.c
+++ b/mm/vmscan.c +++ b/mm/vmscan.c
@@ -51,6 +51,7 @@ @@ -51,6 +51,7 @@
@ -208,7 +196,7 @@ index e7b74ab67973..ea3d497019ab 100644
#include <asm/tlbflush.h> #include <asm/tlbflush.h>
#include <asm/div64.h> #include <asm/div64.h>
@@ -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 #ifdef CONFIG_LRU_GEN
@ -223,7 +211,7 @@ index e7b74ab67973..ea3d497019ab 100644
/****************************************************************************** /******************************************************************************
* shorthand helpers * 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; goto next;
if (!pmd_trans_huge(pmd[i])) { if (!pmd_trans_huge(pmd[i])) {
@ -233,7 +221,7 @@ index e7b74ab67973..ea3d497019ab 100644
pmdp_test_and_clear_young(vma, addr, pmd + i); pmdp_test_and_clear_young(vma, addr, pmd + i);
goto next; 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]++; walk->mm_stats[MM_NONLEAF_TOTAL]++;
#ifdef CONFIG_ARCH_HAS_NONLEAF_PMD_YOUNG #ifdef CONFIG_ARCH_HAS_NONLEAF_PMD_YOUNG
@ -249,7 +237,7 @@ index e7b74ab67973..ea3d497019ab 100644
#endif #endif
if (!walk->force_scan && !test_bloom_filter(walk->lruvec, walk->max_seq, pmd + i)) if (!walk->force_scan && !test_bloom_filter(walk->lruvec, walk->max_seq, pmd + i))
continue; 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 * handful of PTEs. Spreading the work out over a period of time usually
* is less efficient, but it avoids bursty page faults. * 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); success = iterate_mm_list_nowalk(lruvec, max_seq);
goto done; goto done;
} }
@@ -5071,6 +5083,208 @@ static void lru_gen_shrink_lruvec(struct lruvec *lruvec, struct scan_control *sc @@ -5072,6 +5084,208 @@ done:
blk_finish_plug(&plug);
} }
+/****************************************************************************** /******************************************************************************
+ * state change + * state change
+ ******************************************************************************/ + ******************************************************************************/
+ +
@ -464,10 +451,11 @@ index e7b74ab67973..ea3d497019ab 100644
+ .attrs = lru_gen_attrs, + .attrs = lru_gen_attrs,
+}; +};
+ +
/****************************************************************************** +/******************************************************************************
* initialization * 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; struct lru_gen_struct *lrugen = &lruvec->lrugen;
lrugen->max_seq = MIN_NR_GENS + 1; lrugen->max_seq = MIN_NR_GENS + 1;
@ -485,6 +473,3 @@ index e7b74ab67973..ea3d497019ab 100644
return 0; return 0;
}; };
late_initcall(init_lru_gen); late_initcall(init_lru_gen);
--
2.17.1

View File

@ -44,8 +44,6 @@ Change-Id: I007499d7e47374b59fd620e8c3962940bc9f788e
mm/vmscan.c | 74 ++++++++++++++++++++++++++++++++++++++++-- mm/vmscan.c | 74 ++++++++++++++++++++++++++++++++++++++++--
2 files changed, 73 insertions(+), 3 deletions(-) 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 --- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h +++ b/include/linux/mmzone.h
@@ -419,6 +419,8 @@ struct lru_gen_struct { @@ -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 */ /* the multi-gen LRU lists, lazily sorted on eviction */
struct list_head lists[MAX_NR_GENS][ANON_AND_FILE][MAX_NR_ZONES]; struct list_head lists[MAX_NR_GENS][ANON_AND_FILE][MAX_NR_ZONES];
/* the multi-gen LRU sizes, eventually consistent */ /* 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 --- a/mm/vmscan.c
+++ b/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++) for (type = 0; type < ANON_AND_FILE; type++)
reset_ctrl_pos(lruvec, type, false); reset_ctrl_pos(lruvec, type, false);
@ -69,7 +65,7 @@ index ea3d497019ab..0df253819edc 100644
/* make sure preceding modifications appear */ /* make sure preceding modifications appear */
smp_store_release(&lrugen->max_seq, lrugen->max_seq + 1); 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; return false;
} }
@ -78,7 +74,7 @@ index ea3d497019ab..0df253819edc 100644
{ {
bool need_aging; bool need_aging;
unsigned long nr_to_scan; 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); mem_cgroup_calculate_protection(NULL, memcg);
if (mem_cgroup_below_min(memcg)) if (mem_cgroup_below_min(memcg))
@ -116,7 +112,7 @@ index ea3d497019ab..0df253819edc 100644
VM_WARN_ON_ONCE(!current_is_kswapd()); 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 { do {
struct lruvec *lruvec = mem_cgroup_lruvec(memcg, pgdat); 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 * sysfs interface
******************************************************************************/ ******************************************************************************/
@ -179,7 +175,7 @@ index ea3d497019ab..0df253819edc 100644
static ssize_t show_enabled(struct kobject *kobj, struct kobj_attribute *attr, char *buf) static ssize_t show_enabled(struct kobject *kobj, struct kobj_attribute *attr, char *buf)
{ {
unsigned int caps = 0; 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[] = { static struct attribute *lru_gen_attrs[] = {
@ -187,7 +183,7 @@ index ea3d497019ab..0df253819edc 100644
&lru_gen_enabled_attr.attr, &lru_gen_enabled_attr.attr,
NULL 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) void lru_gen_init_lruvec(struct lruvec *lruvec)
{ {
@ -204,6 +200,3 @@ index ea3d497019ab..0df253819edc 100644
for_each_gen_type_zone(gen, type, zone) for_each_gen_type_zone(gen, type, zone)
INIT_LIST_HEAD(&lrugen->lists[gen][type][zone]); INIT_LIST_HEAD(&lrugen->lists[gen][type][zone]);
--
2.17.1

View File

@ -42,11 +42,9 @@ Change-Id: I7bb06f14e0a94901a076cc3767d0855d4f1ea3ab
mm/vmscan.c | 411 ++++++++++++++++++++++++++++++++++++++- mm/vmscan.c | 411 ++++++++++++++++++++++++++++++++++++++-
2 files changed, 402 insertions(+), 10 deletions(-) 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 --- a/include/linux/nodemask.h
+++ b/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_online_node 0
#define first_memory_node 0 #define first_memory_node 0
#define next_online_node(nid) (MAX_NUMNODES) #define next_online_node(nid) (MAX_NUMNODES)
@ -54,8 +52,6 @@ index 4b71a96190a8..3a0eec9f2faa 100644
#define nr_node_ids 1U #define nr_node_ids 1U
#define nr_online_nodes 1U #define nr_online_nodes 1U
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 0df253819edc..3e7aad06299b 100644
--- a/mm/vmscan.c --- a/mm/vmscan.c
+++ b/mm/vmscan.c +++ b/mm/vmscan.c
@@ -52,6 +52,7 @@ @@ -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) 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; return success;
} }
@ -117,7 +113,7 @@ index 0df253819edc..3e7aad06299b 100644
{ {
int prev, next; int prev, next;
int type, zone; 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) if (get_nr_gens(lruvec, type) != MAX_NR_GENS)
continue; 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, static bool try_to_inc_max_seq(struct lruvec *lruvec, unsigned long max_seq,
@ -142,7 +138,7 @@ index 0df253819edc..3e7aad06299b 100644
{ {
bool success; bool success;
struct lru_gen_mm_walk *walk; 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 * handful of PTEs. Spreading the work out over a period of time usually
* is less efficient, but it avoids bursty page faults. * 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); success = iterate_mm_list_nowalk(lruvec, max_seq);
goto done; 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->lruvec = lruvec;
walk->max_seq = max_seq; walk->max_seq = max_seq;
walk->can_swap = can_swap; walk->can_swap = can_swap;
@ -160,7 +156,7 @@ index 0df253819edc..3e7aad06299b 100644
do { do {
success = iterate_mm_list(lruvec, walk, &mm); 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)); 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 */ /* either this sees any waiters or they will see updated max_seq */
if (wq_has_sleeper(&lruvec->mm_state.wait)) if (wq_has_sleeper(&lruvec->mm_state.wait))
wake_up_all(&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) if (need_aging)
@ -178,7 +174,7 @@ index 0df253819edc..3e7aad06299b 100644
return true; 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()) if (current_is_kswapd())
return 0; return 0;
@ -187,11 +183,10 @@ index 0df253819edc..3e7aad06299b 100644
return nr_to_scan; return nr_to_scan;
done: done:
return min_seq[!can_swap] + MIN_NR_GENS <= max_seq ? nr_to_scan : 0; 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 = { @@ -5350,6 +5383,361 @@ static struct attribute_group lru_gen_at
.attrs = lru_gen_attrs,
}; };
+/****************************************************************************** /******************************************************************************
+ * debugfs interface + * debugfs interface
+ ******************************************************************************/ + ******************************************************************************/
+ +
@ -546,9 +541,10 @@ index 0df253819edc..3e7aad06299b 100644
+ .release = seq_release, + .release = seq_release,
+}; +};
+ +
/****************************************************************************** +/******************************************************************************
* initialization * initialization
******************************************************************************/ ******************************************************************************/
@@ -5406,6 +5794,9 @@ static int __init init_lru_gen(void) @@ -5406,6 +5794,9 @@ static int __init init_lru_gen(void)
if (sysfs_create_group(mm_kobj, &lru_gen_attr_group)) if (sysfs_create_group(mm_kobj, &lru_gen_attr_group))
pr_err("lru_gen: failed to create sysfs group\n"); pr_err("lru_gen: failed to create sysfs group\n");
@ -559,6 +555,3 @@ index 0df253819edc..3e7aad06299b 100644
return 0; return 0;
}; };
late_initcall(init_lru_gen); late_initcall(init_lru_gen);
--
2.17.1

View File

@ -30,8 +30,6 @@ Change-Id: I1902178bcbb5adfa0a748c4d284a6456059bdd7e
4 files changed, 169 insertions(+), 1 deletion(-) 4 files changed, 169 insertions(+), 1 deletion(-)
create mode 100644 Documentation/admin-guide/mm/multigen_lru.rst 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 --- a/Documentation/admin-guide/mm/index.rst
+++ b/Documentation/admin-guide/mm/index.rst +++ b/Documentation/admin-guide/mm/index.rst
@@ -32,6 +32,7 @@ the Linux memory management. @@ -32,6 +32,7 @@ the Linux memory management.
@ -42,9 +40,6 @@ index 1bd11118dfb1..d1064e0ba34a 100644
nommu-mmap nommu-mmap
numa_memory_policy numa_memory_policy
numaperf 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 --- /dev/null
+++ b/Documentation/admin-guide/mm/multigen_lru.rst +++ b/Documentation/admin-guide/mm/multigen_lru.rst
@@ -0,0 +1,162 @@ @@ -0,0 +1,162 @@
@ -210,8 +205,6 @@ index 000000000000..33e068830497
+server according to the ranking result obtained from the working set +server according to the ranking result obtained from the working set
+estimation step. This less forceful approach limits the impacts on the +estimation step. This less forceful approach limits the impacts on the
+existing jobs. +existing jobs.
diff --git a/mm/Kconfig b/mm/Kconfig
index 6c86849c4db9..96cd3ae25c6f 100644
--- a/mm/Kconfig --- a/mm/Kconfig
+++ b/mm/Kconfig +++ b/mm/Kconfig
@@ -1131,7 +1131,8 @@ config LRU_GEN @@ -1131,7 +1131,8 @@ config LRU_GEN
@ -224,11 +217,9 @@ index 6c86849c4db9..96cd3ae25c6f 100644
config LRU_GEN_ENABLED config LRU_GEN_ENABLED
bool "Enable by default" bool "Enable by default"
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 3e7aad06299b..146a54cf1bd9 100644
--- a/mm/vmscan.c --- a/mm/vmscan.c
+++ b/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))); 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, static ssize_t store_min_ttl(struct kobject *kobj, struct kobj_attribute *attr,
const char *buf, size_t len) 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); 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, static ssize_t store_enabled(struct kobject *kobj, struct kobj_attribute *attr,
const char *buf, size_t len) 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'); seq_putc(m, '\n');
} }
@ -252,7 +243,7 @@ index 3e7aad06299b..146a54cf1bd9 100644
static int lru_gen_seq_show(struct seq_file *m, void *v) static int lru_gen_seq_show(struct seq_file *m, void *v)
{ {
unsigned long seq; 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; return err;
} }
@ -260,6 +251,3 @@ index 3e7aad06299b..146a54cf1bd9 100644
static ssize_t lru_gen_seq_write(struct file *file, const char __user *src, static ssize_t lru_gen_seq_write(struct file *file, const char __user *src,
size_t len, loff_t *pos) size_t len, loff_t *pos)
{ {
--
2.17.1

View File

@ -28,11 +28,9 @@ Change-Id: I958afcabf5abc37b3e58f72638d35a349c31b98d
2 files changed, 160 insertions(+) 2 files changed, 160 insertions(+)
create mode 100644 Documentation/mm/multigen_lru.rst 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 --- a/Documentation/mm/index.rst
+++ b/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 ksm
memory-model memory-model
mmu_notifier mmu_notifier
@ -40,9 +38,6 @@ index 575ccd40e30c..4aa12b8be278 100644
numa numa
overcommit-accounting overcommit-accounting
page_migration 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 --- /dev/null
+++ b/Documentation/mm/multigen_lru.rst +++ b/Documentation/mm/multigen_lru.rst
@@ -0,0 +1,159 @@ @@ -0,0 +1,159 @@
@ -205,6 +200,3 @@ index 000000000000..d7062c6a8946
+inserting hot densely populated page tables to the Bloom filters. +inserting hot densely populated page tables to the Bloom filters.
+Within the eviction, the PID controller uses refaults as the feedback +Within the eviction, the PID controller uses refaults as the feedback
+to select types to evict and tiers to protect. +to select types to evict and tiers to protect.
--
2.17.1

View File

@ -1,6 +1,6 @@
--- a/block/blk.h --- a/block/blk.h
+++ b/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_NONE 0
#define ADDPART_FLAG_RAID 1 #define ADDPART_FLAG_RAID 1
#define ADDPART_FLAG_WHOLEDISK 2 #define ADDPART_FLAG_WHOLEDISK 2

View File

@ -22,7 +22,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
#include <linux/crc32.h> #include <linux/crc32.h>
#include <linux/if_vlan.h> #include <linux/if_vlan.h>
#include <linux/uaccess.h> #include <linux/uaccess.h>
@@ -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); ocp_write_word(tp, MCU_TYPE_PLA, PLA_RSTTALLY, ocp_data);
} }
@ -45,7 +45,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
static void r8152b_init(struct r8152 *tp) static void r8152b_init(struct r8152 *tp)
{ {
u32 ocp_data; 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 = ocp_read_word(tp, MCU_TYPE_USB, USB_USB_CTRL);
ocp_data &= ~(RX_AGG_DISABLE | RX_ZERO_EN); ocp_data &= ~(RX_AGG_DISABLE | RX_ZERO_EN);
ocp_write_word(tp, MCU_TYPE_USB, USB_USB_CTRL, ocp_data); ocp_write_word(tp, MCU_TYPE_USB, USB_USB_CTRL, ocp_data);
@ -54,7 +54,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
} }
static void r8153_init(struct r8152 *tp) 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; tp->coalesce = COALESCE_SLOW;
break; break;
} }
@ -63,7 +63,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
} }
static void r8153b_init(struct r8152 *tp) 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); rtl_tally_reset(tp);
tp->coalesce = 15000; /* 15 us */ tp->coalesce = 15000; /* 15 us */

View File

@ -64,7 +64,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
+dma-shared-buffer-objs := $(dma-buf-objs-y) +dma-shared-buffer-objs := $(dma-buf-objs-y)
--- a/drivers/dma-buf/dma-buf.c --- a/drivers/dma-buf/dma-buf.c
+++ b/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); kern_unmount(dma_buf_mnt);
dma_buf_uninit_sysfs_statistics(); dma_buf_uninit_sysfs_statistics();
} }
@ -73,7 +73,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
+MODULE_LICENSE("GPL"); +MODULE_LICENSE("GPL");
--- a/kernel/sched/core.c --- a/kernel/sched/core.c
+++ b/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); return try_to_wake_up(p, state, 0);
} }

View File

@ -94,7 +94,7 @@ Signed-off-by: Zhi Chen <zhichen@codeaurora.org>
#ifdef CONFIG_NF_CONNTRACK_EVENTS #ifdef CONFIG_NF_CONNTRACK_EVENTS
--- a/include/net/netns/conntrack.h --- a/include/net/netns/conntrack.h
+++ b/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; u8 sysctl_checksum;
struct ip_conntrack_stat __percpu *stat; struct ip_conntrack_stat __percpu *stat;
@ -123,8 +123,8 @@ Signed-off-by: Zhi Chen <zhichen@codeaurora.org>
depends on NETFILTER_ADVANCED depends on NETFILTER_ADVANCED
--- a/net/netfilter/nf_conntrack_core.c --- a/net/netfilter/nf_conntrack_core.c
+++ b/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 @@ -2803,6 +2803,10 @@ int nf_conntrack_init_net(struct net *ne
nf_conntrack_helper_pernet_init(net); nf_conntrack_ecache_pernet_init(net);
nf_conntrack_proto_pernet_init(net); nf_conntrack_proto_pernet_init(net);
+#ifdef CONFIG_NF_CONNTRACK_CHAIN_EVENTS +#ifdef CONFIG_NF_CONNTRACK_CHAIN_EVENTS
@ -319,7 +319,7 @@ Signed-off-by: Zhi Chen <zhichen@codeaurora.org>
struct nf_conn *ct = item->ct; struct nf_conn *ct = item->ct;
struct sk_buff *skb; struct sk_buff *skb;
unsigned int type; 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 #ifdef CONFIG_NF_CONNTRACK_EVENTS
@ -337,7 +337,7 @@ Signed-off-by: Zhi Chen <zhichen@codeaurora.org>
static const struct nfnl_callback ctnl_cb[IPCTNL_MSG_MAX] = { static const struct nfnl_callback ctnl_cb[IPCTNL_MSG_MAX] = {
[IPCTNL_MSG_CT_NEW] = { [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) static void ctnetlink_net_pre_exit(struct net *net)
{ {
#ifdef CONFIG_NF_CONNTRACK_EVENTS #ifdef CONFIG_NF_CONNTRACK_EVENTS

View File

@ -12,9 +12,9 @@
struct list_head *br_ip_list); struct list_head *br_ip_list);
--- a/include/linux/skbuff.h --- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h +++ b/include/linux/skbuff.h
@@ -1146,6 +1146,10 @@ struct sk_buff { @@ -979,6 +979,10 @@ struct sk_buff {
__u8 slow_gro:1;
__u8 csum_not_inet:1; __u8 csum_not_inet:1;
__u8 scm_io_uring:1;
+#ifdef CONFIG_SHORTCUT_FE +#ifdef CONFIG_SHORTCUT_FE
+ __u8 fast_forwarded:1; + __u8 fast_forwarded:1;

View File

@ -9,7 +9,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/include/linux/skbuff.h --- a/include/linux/skbuff.h
+++ b/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) * NET_IP_ALIGN(2) + ethernet_header(14) + IP_header(20/40) + ports(8)
*/ */
#ifndef NET_SKB_PAD #ifndef NET_SKB_PAD

View File

@ -22,7 +22,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
#endif #endif
--- a/include/linux/skbuff.h --- a/include/linux/skbuff.h
+++ b/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 #ifdef CONFIG_IPV6_NDISC_NODETYPE
__u8 ndisc_nodetype:2; __u8 ndisc_nodetype:2;
#endif #endif

View File

@ -9,7 +9,7 @@
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-hugsun-x99.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-hugsun-x99.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-khadas-edge.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-khadas-edge.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-khadas-edge-captain.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.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-roc-pc-mezzanine.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-roc-pc-mezzanine.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-roc-pc-plus.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-roc-pc-plus.dtb

View File

@ -62,7 +62,7 @@ Signed-off-by: Furkan Kardame <f.kardame@manjaro.org>
static int yt8511_read_page(struct phy_device *phydev) static int yt8511_read_page(struct phy_device *phydev)
{ {
return __phy_read(phydev, YT8511_PAGE_SELECT); 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); return phy_restore_page(phydev, oldpage, ret);
} }
@ -114,7 +114,7 @@ Signed-off-by: Furkan Kardame <f.kardame@manjaro.org>
static struct phy_driver motorcomm_phy_drvs[] = { static struct phy_driver motorcomm_phy_drvs[] = {
{ {
PHY_ID_MATCH_EXACT(PHY_ID_YT8511), 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, .resume = genphy_resume,
.read_page = yt8511_read_page, .read_page = yt8511_read_page,
.write_page = yt8511_write_page, .write_page = yt8511_write_page,
@ -131,7 +131,7 @@ Signed-off-by: Furkan Kardame <f.kardame@manjaro.org>
}; };
module_phy_driver(motorcomm_phy_drvs); 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[] = { static const struct mdio_device_id __maybe_unused motorcomm_tbl[] = {
{ PHY_ID_MATCH_EXACT(PHY_ID_YT8511) }, { PHY_ID_MATCH_EXACT(PHY_ID_YT8511) },

View File

@ -14,7 +14,7 @@ Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
--- a/MAINTAINERS --- a/MAINTAINERS
+++ b/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: drivers/hid/hid-roccat*
F: include/linux/hid-roccat* F: include/linux/hid-roccat*

View File

@ -12,7 +12,7 @@ Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
--- a/MAINTAINERS --- a/MAINTAINERS
+++ b/MAINTAINERS +++ b/MAINTAINERS
@@ -17575,6 +17575,7 @@ M: Corentin Labbe <clabbe@baylibre.com> @@ -17574,6 +17574,7 @@ M: Corentin Labbe <clabbe@baylibre.com>
L: linux-crypto@vger.kernel.org L: linux-crypto@vger.kernel.org
S: Maintained S: Maintained
F: Documentation/devicetree/bindings/crypto/rockchip,rk3288-crypto.yaml F: Documentation/devicetree/bindings/crypto/rockchip,rk3288-crypto.yaml

View File

@ -1,10 +1,10 @@
--- a/arch/arm64/boot/dts/rockchip/Makefile --- a/arch/arm64/boot/dts/rockchip/Makefile
+++ b/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.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rock-pi-4b-plus.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-rock-pi-4c.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-king3399.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-king3399.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rock960.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rock960.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rockpro64-v2.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rockpro64-v2.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rockpro64.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rockpro64.dtb

View File

@ -1,6 +1,6 @@
--- a/arch/arm64/boot/dts/rockchip/Makefile --- a/arch/arm64/boot/dts/rockchip/Makefile
+++ b/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-bpi-r2-pro.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-evb1-v10.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-evb1-v10.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-rock-3a.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-rock-3a.dtb

View File

@ -31,7 +31,7 @@ Signed-off-by: wevsty <ty@wevs.org>
reg = <0x0 0xff100000 0x0 0x1000>; reg = <0x0 0xff100000 0x0 0x1000>;
--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
+++ b/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 <ty@wevs.org>
reg = <0x0 0xff9a0000 0x0 0x10000>; reg = <0x0 0xff9a0000 0x0 0x10000>;
--- a/arch/arm64/boot/dts/rockchip/rk3568.dtsi --- a/arch/arm64/boot/dts/rockchip/rk3568.dtsi
+++ b/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 { + rng: rng@fe388000 {

View File

@ -13,7 +13,7 @@ Signed-off-by: hmz007 <hmz007@gmail.com>
--- a/drivers/devfreq/Kconfig --- a/drivers/devfreq/Kconfig
+++ b/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 buck voltages and update a proper CCI frequency. Use the notification
to get the regulator status. to get the regulator status.
@ -34,7 +34,7 @@ Signed-off-by: hmz007 <hmz007@gmail.com>
depends on (ARCH_ROCKCHIP && HAVE_ARM_SMCCC) || \ depends on (ARCH_ROCKCHIP && HAVE_ARM_SMCCC) || \
--- a/drivers/devfreq/Makefile --- a/drivers/devfreq/Makefile
+++ b/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_IMX_BUS_DEVFREQ) += imx-bus.o
obj-$(CONFIG_ARM_IMX8M_DDRC_DEVFREQ) += imx8m-ddrc.o obj-$(CONFIG_ARM_IMX8M_DDRC_DEVFREQ) += imx8m-ddrc.o
obj-$(CONFIG_ARM_MEDIATEK_CCI_DEVFREQ) += mtk-cci-devfreq.o obj-$(CONFIG_ARM_MEDIATEK_CCI_DEVFREQ) += mtk-cci-devfreq.o

View File

@ -28,7 +28,7 @@ Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
+ }; + };
}; };
cluster1_opp: opp-table1 { cluster1_opp: opp-table-1 {
@@ -72,6 +80,14 @@ @@ -72,6 +80,14 @@
opp-hz = /bits/ 64 <1800000000>; opp-hz = /bits/ 64 <1800000000>;
opp-microvolt = <1200000 1200000 1250000>; opp-microvolt = <1200000 1200000 1250000>;
@ -43,4 +43,4 @@ Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
+ }; + };
}; };
gpu_opp_table: opp-table2 { gpu_opp_table: opp-table-2 {

View File

@ -1,14 +1,21 @@
--- a/drivers/staging/Kconfig --- a/drivers/staging/Kconfig
+++ b/drivers/staging/Kconfig +++ b/drivers/staging/Kconfig
@@ -40,2 +40,4 @@ @@ -38,6 +38,8 @@ source "drivers/staging/rtl8712/Kconfig"
+source "drivers/staging/rts5139/Kconfig" source "drivers/staging/r8188eu/Kconfig"
+
source "drivers/staging/rts5208/Kconfig" +source "drivers/staging/rts5139/Kconfig"
+
--- a/drivers/staging/Makefile source "drivers/staging/rts5208/Kconfig"
+++ b/drivers/staging/Makefile
@@ -11,2 +11,3 @@ source "drivers/staging/octeon/Kconfig"
obj-$(CONFIG_R8188EU) += r8188eu/ --- a/drivers/staging/Makefile
+obj-$(CONFIG_RTS5139) += rts5139/ +++ b/drivers/staging/Makefile
obj-$(CONFIG_RTS5208) += rts5208/ @@ -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/