diff options
Diffstat (limited to 'target/linux/generic/backport-5.15/020-v6.3-21-mm-multi-gen-LRU-rename-lru_gen_struct-to-lru_gen_pa.patch')
-rw-r--r-- | target/linux/generic/backport-5.15/020-v6.3-21-mm-multi-gen-LRU-rename-lru_gen_struct-to-lru_gen_pa.patch | 51 |
1 files changed, 20 insertions, 31 deletions
diff --git a/target/linux/generic/backport-5.15/020-v6.3-21-mm-multi-gen-LRU-rename-lru_gen_struct-to-lru_gen_pa.patch b/target/linux/generic/backport-5.15/020-v6.3-21-mm-multi-gen-LRU-rename-lru_gen_struct-to-lru_gen_pa.patch index 836a16b8c7..4e09173681 100644 --- a/target/linux/generic/backport-5.15/020-v6.3-21-mm-multi-gen-LRU-rename-lru_gen_struct-to-lru_gen_pa.patch +++ b/target/linux/generic/backport-5.15/020-v6.3-21-mm-multi-gen-LRU-rename-lru_gen_struct-to-lru_gen_pa.patch @@ -122,11 +122,9 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org> mm/workingset.c | 4 ++-- 4 files changed, 24 insertions(+), 24 deletions(-) -diff --git a/include/linux/mm_inline.h b/include/linux/mm_inline.h -index 8a6a2a23f9b6..27c4890503c5 100644 --- a/include/linux/mm_inline.h +++ b/include/linux/mm_inline.h -@@ -168,7 +168,7 @@ static inline void lru_gen_update_size(struct lruvec *lruvec, struct page *page, +@@ -168,7 +168,7 @@ static inline void lru_gen_update_size(s int zone = page_zonenum(page); int delta = thp_nr_pages(page); enum lru_list lru = type * LRU_INACTIVE_FILE; @@ -135,7 +133,7 @@ index 8a6a2a23f9b6..27c4890503c5 100644 VM_WARN_ON_ONCE(old_gen != -1 && old_gen >= MAX_NR_GENS); VM_WARN_ON_ONCE(new_gen != -1 && new_gen >= MAX_NR_GENS); -@@ -214,7 +214,7 @@ static inline bool lru_gen_add_page(struct lruvec *lruvec, struct page *page, bo +@@ -214,7 +214,7 @@ static inline bool lru_gen_add_page(stru int gen = page_lru_gen(page); int type = page_is_file_lru(page); int zone = page_zonenum(page); @@ -144,8 +142,6 @@ index 8a6a2a23f9b6..27c4890503c5 100644 VM_WARN_ON_ONCE_PAGE(gen != -1, page); -diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h -index 6b85ba1f4e18..5856b026c089 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -394,7 +394,7 @@ enum { @@ -175,11 +171,9 @@ index 6b85ba1f4e18..5856b026c089 100644 /* to concurrently iterate lru_gen_mm_list */ struct lru_gen_mm_state mm_state; #endif -diff --git a/mm/vmscan.c b/mm/vmscan.c -index 4ab376abeaae..3b1b5bd9736a 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c -@@ -2910,7 +2910,7 @@ static int get_nr_gens(struct lruvec *lruvec, int type) +@@ -2910,7 +2910,7 @@ static int get_nr_gens(struct lruvec *lr static bool __maybe_unused seq_is_valid(struct lruvec *lruvec) { @@ -197,7 +191,7 @@ index 4ab376abeaae..3b1b5bd9736a 100644 int hist = lru_hist_from_seq(lrugen->min_seq[type]); pos->refaulted = lrugen->avg_refaulted[type][tier] + -@@ -3331,7 +3331,7 @@ static void read_ctrl_pos(struct lruvec *lruvec, int type, int tier, int gain, +@@ -3331,7 +3331,7 @@ static void read_ctrl_pos(struct lruvec static void reset_ctrl_pos(struct lruvec *lruvec, int type, bool carryover) { int hist, tier; @@ -206,7 +200,7 @@ index 4ab376abeaae..3b1b5bd9736a 100644 bool clear = carryover ? NR_HIST_GENS == 1 : NR_HIST_GENS > 1; unsigned long seq = carryover ? lrugen->min_seq[type] : lrugen->max_seq + 1; -@@ -3408,7 +3408,7 @@ static int page_update_gen(struct page *page, int gen) +@@ -3408,7 +3408,7 @@ static int page_update_gen(struct page * static int page_inc_gen(struct lruvec *lruvec, struct page *page, bool reclaiming) { int type = page_is_file_lru(page); @@ -215,7 +209,7 @@ index 4ab376abeaae..3b1b5bd9736a 100644 int new_gen, old_gen = lru_gen_from_seq(lrugen->min_seq[type]); unsigned long new_flags, old_flags = READ_ONCE(page->flags); -@@ -3453,7 +3453,7 @@ static void update_batch_size(struct lru_gen_mm_walk *walk, struct page *page, +@@ -3453,7 +3453,7 @@ static void update_batch_size(struct lru static void reset_batch_size(struct lruvec *lruvec, struct lru_gen_mm_walk *walk) { int gen, type, zone; @@ -224,7 +218,7 @@ index 4ab376abeaae..3b1b5bd9736a 100644 walk->batched = 0; -@@ -3979,7 +3979,7 @@ static bool inc_min_seq(struct lruvec *lruvec, int type, bool can_swap) +@@ -3979,7 +3979,7 @@ static bool inc_min_seq(struct lruvec *l { int zone; int remaining = MAX_LRU_BATCH; @@ -233,7 +227,7 @@ index 4ab376abeaae..3b1b5bd9736a 100644 int new_gen, old_gen = lru_gen_from_seq(lrugen->min_seq[type]); if (type == LRU_GEN_ANON && !can_swap) -@@ -4015,7 +4015,7 @@ static bool try_to_inc_min_seq(struct lruvec *lruvec, bool can_swap) +@@ -4015,7 +4015,7 @@ static bool try_to_inc_min_seq(struct lr { int gen, type, zone; bool success = false; @@ -242,7 +236,7 @@ index 4ab376abeaae..3b1b5bd9736a 100644 DEFINE_MIN_SEQ(lruvec); VM_WARN_ON_ONCE(!seq_is_valid(lruvec)); -@@ -4036,7 +4036,7 @@ static bool try_to_inc_min_seq(struct lruvec *lruvec, bool can_swap) +@@ -4036,7 +4036,7 @@ next: ; } @@ -251,7 +245,7 @@ index 4ab376abeaae..3b1b5bd9736a 100644 if (can_swap) { min_seq[LRU_GEN_ANON] = min(min_seq[LRU_GEN_ANON], min_seq[LRU_GEN_FILE]); min_seq[LRU_GEN_FILE] = max(min_seq[LRU_GEN_ANON], lrugen->min_seq[LRU_GEN_FILE]); -@@ -4058,7 +4058,7 @@ static void inc_max_seq(struct lruvec *lruvec, bool can_swap, bool force_scan) +@@ -4058,7 +4058,7 @@ static void inc_max_seq(struct lruvec *l { int prev, next; int type, zone; @@ -260,7 +254,7 @@ index 4ab376abeaae..3b1b5bd9736a 100644 spin_lock_irq(&lruvec->lru_lock); -@@ -4116,7 +4116,7 @@ static bool try_to_inc_max_seq(struct lruvec *lruvec, unsigned long max_seq, +@@ -4116,7 +4116,7 @@ static bool try_to_inc_max_seq(struct lr bool success; struct lru_gen_mm_walk *walk; struct mm_struct *mm = NULL; @@ -269,7 +263,7 @@ index 4ab376abeaae..3b1b5bd9736a 100644 VM_WARN_ON_ONCE(max_seq > READ_ONCE(lrugen->max_seq)); -@@ -4181,7 +4181,7 @@ static bool should_run_aging(struct lruvec *lruvec, unsigned long max_seq, unsig +@@ -4181,7 +4181,7 @@ static bool should_run_aging(struct lruv unsigned long old = 0; unsigned long young = 0; unsigned long total = 0; @@ -278,7 +272,7 @@ index 4ab376abeaae..3b1b5bd9736a 100644 struct mem_cgroup *memcg = lruvec_memcg(lruvec); for (type = !can_swap; type < ANON_AND_FILE; type++) { -@@ -4466,7 +4466,7 @@ static bool sort_page(struct lruvec *lruvec, struct page *page, int tier_idx) +@@ -4466,7 +4466,7 @@ static bool sort_page(struct lruvec *lru int delta = thp_nr_pages(page); int refs = page_lru_refs(page); int tier = lru_tier_from_refs(refs); @@ -287,7 +281,7 @@ index 4ab376abeaae..3b1b5bd9736a 100644 VM_WARN_ON_ONCE_PAGE(gen >= MAX_NR_GENS, page); -@@ -4566,7 +4566,7 @@ static int scan_pages(struct lruvec *lruvec, struct scan_control *sc, +@@ -4566,7 +4566,7 @@ static int scan_pages(struct lruvec *lru int scanned = 0; int isolated = 0; int remaining = MAX_LRU_BATCH; @@ -296,7 +290,7 @@ index 4ab376abeaae..3b1b5bd9736a 100644 struct mem_cgroup *memcg = lruvec_memcg(lruvec); VM_WARN_ON_ONCE(!list_empty(list)); -@@ -4967,7 +4967,7 @@ static void lru_gen_shrink_lruvec(struct lruvec *lruvec, struct scan_control *sc +@@ -4967,7 +4967,7 @@ done: static bool __maybe_unused state_is_valid(struct lruvec *lruvec) { @@ -305,7 +299,7 @@ index 4ab376abeaae..3b1b5bd9736a 100644 if (lrugen->enabled) { enum lru_list lru; -@@ -5247,7 +5247,7 @@ static void lru_gen_seq_show_full(struct seq_file *m, struct lruvec *lruvec, +@@ -5247,7 +5247,7 @@ static void lru_gen_seq_show_full(struct int i; int type, tier; int hist = lru_hist_from_seq(seq); @@ -314,7 +308,7 @@ index 4ab376abeaae..3b1b5bd9736a 100644 for (tier = 0; tier < MAX_NR_TIERS; tier++) { seq_printf(m, " %10d", tier); -@@ -5296,7 +5296,7 @@ static int lru_gen_seq_show(struct seq_file *m, void *v) +@@ -5296,7 +5296,7 @@ static int lru_gen_seq_show(struct seq_f unsigned long seq; bool full = !debugfs_real_fops(m->file)->write; struct lruvec *lruvec = v; @@ -323,7 +317,7 @@ index 4ab376abeaae..3b1b5bd9736a 100644 int nid = lruvec_pgdat(lruvec)->node_id; struct mem_cgroup *memcg = lruvec_memcg(lruvec); DEFINE_MAX_SEQ(lruvec); -@@ -5549,7 +5549,7 @@ void lru_gen_init_lruvec(struct lruvec *lruvec) +@@ -5549,7 +5549,7 @@ void lru_gen_init_lruvec(struct lruvec * { int i; int gen, type, zone; @@ -332,11 +326,9 @@ index 4ab376abeaae..3b1b5bd9736a 100644 lrugen->max_seq = MIN_NR_GENS + 1; lrugen->enabled = lru_gen_enabled(); -diff --git a/mm/workingset.c b/mm/workingset.c -index aeba62cebf8c..a5e1798c6d60 100644 --- a/mm/workingset.c +++ b/mm/workingset.c -@@ -223,7 +223,7 @@ static void *lru_gen_eviction(struct page *page) +@@ -223,7 +223,7 @@ static void *lru_gen_eviction(struct pag unsigned long token; unsigned long min_seq; struct lruvec *lruvec; @@ -345,7 +337,7 @@ index aeba62cebf8c..a5e1798c6d60 100644 int type = page_is_file_lru(page); int delta = thp_nr_pages(page); int refs = page_lru_refs(page); -@@ -252,7 +252,7 @@ static void lru_gen_refault(struct page *page, void *shadow) +@@ -252,7 +252,7 @@ static void lru_gen_refault(struct page unsigned long token; unsigned long min_seq; struct lruvec *lruvec; @@ -354,6 +346,3 @@ index aeba62cebf8c..a5e1798c6d60 100644 struct mem_cgroup *memcg; struct pglist_data *pgdat; int type = page_is_file_lru(page); --- -2.40.0 - |