generic: 5.15: refresh kernel patches
[openwrt/staging/ldir.git] / target / linux / generic / backport-5.15 / 020-v6.3-24-mm-multi-gen-LRU-remove-aging-fairness-safeguard.patch
index 82ba77dec207fff0580294ab200f074c3a515cbd..316217ed028d251abdac1902bd49393640b97f91 100644 (file)
@@ -35,8 +35,6 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
  mm/vmscan.c | 126 ++++++++++++++++++++++++----------------------------
  1 file changed, 59 insertions(+), 67 deletions(-)
 
-diff --git a/mm/vmscan.c b/mm/vmscan.c
-index 40e7a947c5c7..7159436872ba 100644
 --- a/mm/vmscan.c
 +++ b/mm/vmscan.c
 @@ -131,7 +131,6 @@ struct scan_control {
@@ -47,7 +45,7 @@ index 40e7a947c5c7..7159436872ba 100644
        unsigned long last_reclaimed;
  #endif
  
-@@ -4184,7 +4183,7 @@ static bool try_to_inc_max_seq(struct lruvec *lruvec, unsigned long max_seq,
+@@ -4184,7 +4183,7 @@ done:
        return true;
  }
  
@@ -56,7 +54,7 @@ index 40e7a947c5c7..7159436872ba 100644
                             struct scan_control *sc, bool can_swap, unsigned long *nr_to_scan)
  {
        int gen, type, zone;
-@@ -4193,6 +4192,13 @@ static bool should_run_aging(struct lruvec *lruvec, unsigned long max_seq, unsig
+@@ -4193,6 +4192,13 @@ static bool should_run_aging(struct lruv
        unsigned long total = 0;
        struct lru_gen_page *lrugen = &lruvec->lrugen;
        struct mem_cgroup *memcg = lruvec_memcg(lruvec);
@@ -70,7 +68,7 @@ index 40e7a947c5c7..7159436872ba 100644
  
        for (type = !can_swap; type < ANON_AND_FILE; type++) {
                unsigned long seq;
-@@ -4221,8 +4227,6 @@ static bool should_run_aging(struct lruvec *lruvec, unsigned long max_seq, unsig
+@@ -4221,8 +4227,6 @@ static bool should_run_aging(struct lruv
         * stalls when the number of generations reaches MIN_NR_GENS. Hence, the
         * ideal number of generations is MIN_NR_GENS+1.
         */
@@ -79,7 +77,7 @@ index 40e7a947c5c7..7159436872ba 100644
        if (min_seq[!can_swap] + MIN_NR_GENS < max_seq)
                return false;
  
-@@ -4241,40 +4245,54 @@ static bool should_run_aging(struct lruvec *lruvec, unsigned long max_seq, unsig
+@@ -4241,40 +4245,54 @@ static bool should_run_aging(struct lruv
        return false;
  }
  
@@ -155,7 +153,7 @@ index 40e7a947c5c7..7159436872ba 100644
  }
  
  /* to protect the working set of the last N jiffies */
-@@ -4283,46 +4301,32 @@ static unsigned long lru_gen_min_ttl __read_mostly;
+@@ -4283,46 +4301,32 @@ static unsigned long lru_gen_min_ttl __r
  static void lru_gen_age_node(struct pglist_data *pgdat, struct scan_control *sc)
  {
        struct mem_cgroup *memcg;
@@ -209,7 +207,7 @@ index 40e7a947c5c7..7159436872ba 100644
         */
        if (mutex_trylock(&oom_lock)) {
                struct oom_control oc = {
-@@ -4830,33 +4834,27 @@ static int evict_pages(struct lruvec *lruvec, struct scan_control *sc, int swapp
+@@ -4830,33 +4834,27 @@ retry:
   *    reclaim.
   */
  static unsigned long get_nr_to_scan(struct lruvec *lruvec, struct scan_control *sc,
@@ -249,7 +247,7 @@ index 40e7a947c5c7..7159436872ba 100644
  }
  
  static unsigned long get_nr_to_reclaim(struct scan_control *sc)
-@@ -4875,9 +4873,7 @@ static unsigned long get_nr_to_reclaim(struct scan_control *sc)
+@@ -4875,9 +4873,7 @@ static unsigned long get_nr_to_reclaim(s
  static void lru_gen_shrink_lruvec(struct lruvec *lruvec, struct scan_control *sc)
  {
        struct blk_plug plug;
@@ -259,7 +257,7 @@ index 40e7a947c5c7..7159436872ba 100644
        unsigned long nr_to_reclaim = get_nr_to_reclaim(sc);
  
        lru_add_drain();
-@@ -4898,13 +4894,13 @@ static void lru_gen_shrink_lruvec(struct lruvec *lruvec, struct scan_control *sc
+@@ -4898,13 +4894,13 @@ static void lru_gen_shrink_lruvec(struct
                else
                        swappiness = 0;
  
@@ -276,7 +274,7 @@ index 40e7a947c5c7..7159436872ba 100644
  
                scanned += delta;
                if (scanned >= nr_to_scan)
-@@ -4916,10 +4912,6 @@ static void lru_gen_shrink_lruvec(struct lruvec *lruvec, struct scan_control *sc
+@@ -4916,10 +4912,6 @@ static void lru_gen_shrink_lruvec(struct
                cond_resched();
        }
  
@@ -287,6 +285,3 @@ index 40e7a947c5c7..7159436872ba 100644
        clear_mm_walk();
  
        blk_finish_plug(&plug);
--- 
-2.40.0
-