diff options
Diffstat (limited to 'target/linux/generic/backport-5.15/020-v6.1-12-mm-multi-gen-LRU-debugfs-interface.patch')
-rw-r--r-- | target/linux/generic/backport-5.15/020-v6.1-12-mm-multi-gen-LRU-debugfs-interface.patch | 33 |
1 files changed, 13 insertions, 20 deletions
diff --git a/target/linux/generic/backport-5.15/020-v6.1-12-mm-multi-gen-LRU-debugfs-interface.patch b/target/linux/generic/backport-5.15/020-v6.1-12-mm-multi-gen-LRU-debugfs-interface.patch index ae9d76faa4..482e714bb6 100644 --- a/target/linux/generic/backport-5.15/020-v6.1-12-mm-multi-gen-LRU-debugfs-interface.patch +++ b/target/linux/generic/backport-5.15/020-v6.1-12-mm-multi-gen-LRU-debugfs-interface.patch @@ -64,11 +64,9 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org> mm/vmscan.c | 411 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 402 insertions(+), 10 deletions(-) -diff --git a/include/linux/nodemask.h b/include/linux/nodemask.h -index 0f233b76c9ce..292ec0ce0d63 100644 --- a/include/linux/nodemask.h +++ b/include/linux/nodemask.h -@@ -485,6 +485,7 @@ static inline int num_node_state(enum node_states state) +@@ -485,6 +485,7 @@ static inline int num_node_state(enum no #define first_online_node 0 #define first_memory_node 0 #define next_online_node(nid) (MAX_NUMNODES) @@ -76,8 +74,6 @@ index 0f233b76c9ce..292ec0ce0d63 100644 #define nr_node_ids 1U #define nr_online_nodes 1U -diff --git a/mm/vmscan.c b/mm/vmscan.c -index 642ee7bef61d..b74b334488d8 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -53,6 +53,7 @@ @@ -130,7 +126,7 @@ index 642ee7bef61d..b74b334488d8 100644 } static bool try_to_inc_min_seq(struct lruvec *lruvec, bool can_swap) -@@ -4019,7 +4048,7 @@ static bool try_to_inc_min_seq(struct lruvec *lruvec, bool can_swap) +@@ -4019,7 +4048,7 @@ next: return success; } @@ -139,7 +135,7 @@ index 642ee7bef61d..b74b334488d8 100644 { int prev, next; int type, zone; -@@ -4033,9 +4062,13 @@ static void inc_max_seq(struct lruvec *lruvec, bool can_swap) +@@ -4033,9 +4062,13 @@ static void inc_max_seq(struct lruvec *l if (get_nr_gens(lruvec, type) != MAX_NR_GENS) continue; @@ -155,7 +151,7 @@ index 642ee7bef61d..b74b334488d8 100644 } /* -@@ -4072,7 +4105,7 @@ static void inc_max_seq(struct lruvec *lruvec, bool can_swap) +@@ -4072,7 +4105,7 @@ static void inc_max_seq(struct lruvec *l } static bool try_to_inc_max_seq(struct lruvec *lruvec, unsigned long max_seq, @@ -164,7 +160,7 @@ index 642ee7bef61d..b74b334488d8 100644 { bool success; struct lru_gen_mm_walk *walk; -@@ -4093,7 +4126,7 @@ static bool try_to_inc_max_seq(struct lruvec *lruvec, unsigned long max_seq, +@@ -4093,7 +4126,7 @@ static bool try_to_inc_max_seq(struct lr * handful of PTEs. Spreading the work out over a period of time usually * is less efficient, but it avoids bursty page faults. */ @@ -173,7 +169,7 @@ index 642ee7bef61d..b74b334488d8 100644 success = iterate_mm_list_nowalk(lruvec, max_seq); goto done; } -@@ -4107,7 +4140,7 @@ static bool try_to_inc_max_seq(struct lruvec *lruvec, unsigned long max_seq, +@@ -4107,7 +4140,7 @@ static bool try_to_inc_max_seq(struct lr walk->lruvec = lruvec; walk->max_seq = max_seq; walk->can_swap = can_swap; @@ -182,7 +178,7 @@ index 642ee7bef61d..b74b334488d8 100644 do { success = iterate_mm_list(lruvec, walk, &mm); -@@ -4127,7 +4160,7 @@ static bool try_to_inc_max_seq(struct lruvec *lruvec, unsigned long max_seq, +@@ -4127,7 +4160,7 @@ done: VM_WARN_ON_ONCE(max_seq != READ_ONCE(lrugen->max_seq)); @@ -191,7 +187,7 @@ index 642ee7bef61d..b74b334488d8 100644 /* either this sees any waiters or they will see updated max_seq */ if (wq_has_sleeper(&lruvec->mm_state.wait)) wake_up_all(&lruvec->mm_state.wait); -@@ -4225,7 +4258,7 @@ static bool age_lruvec(struct lruvec *lruvec, struct scan_control *sc, unsigned +@@ -4225,7 +4258,7 @@ static bool age_lruvec(struct lruvec *lr } if (need_aging) @@ -200,7 +196,7 @@ index 642ee7bef61d..b74b334488d8 100644 return true; } -@@ -4784,7 +4817,7 @@ static unsigned long get_nr_to_scan(struct lruvec *lruvec, struct scan_control * +@@ -4784,7 +4817,7 @@ static unsigned long get_nr_to_scan(stru if (current_is_kswapd()) return 0; @@ -209,11 +205,10 @@ index 642ee7bef61d..b74b334488d8 100644 return nr_to_scan; done: return min_seq[!can_swap] + MIN_NR_GENS <= max_seq ? nr_to_scan : 0; -@@ -5123,6 +5156,361 @@ static struct attribute_group lru_gen_attr_group = { - .attrs = lru_gen_attrs, +@@ -5124,6 +5157,361 @@ static struct attribute_group lru_gen_at }; -+/****************************************************************************** + /****************************************************************************** + * debugfs interface + ******************************************************************************/ + @@ -568,9 +563,10 @@ index 642ee7bef61d..b74b334488d8 100644 + .release = seq_release, +}; + - /****************************************************************************** ++/****************************************************************************** * initialization ******************************************************************************/ + @@ -5180,6 +5568,9 @@ static int __init init_lru_gen(void) if (sysfs_create_group(mm_kobj, &lru_gen_attr_group)) pr_err("lru_gen: failed to create sysfs group\n"); @@ -581,6 +577,3 @@ index 642ee7bef61d..b74b334488d8 100644 return 0; }; late_initcall(init_lru_gen); --- -2.40.0 - |