mm/vmscan: remove ignore_references argument of reclaim_pages()
authorSeongJae Park <sj@kernel.org>
Mon, 29 Apr 2024 22:44:50 +0000 (15:44 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 7 May 2024 17:37:02 +0000 (10:37 -0700)
All reclaim_pages() callers are setting 'ignore_references' parameter
'true'.  In other words, the parameter is not really being used.  Remove
the argument to make it simple.

Link: https://lkml.kernel.org/r/20240429224451.67081-4-sj@kernel.org
Signed-off-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/damon/paddr.c
mm/internal.h
mm/madvise.c
mm/vmscan.c

index 974edef1740d0b12703fc5ec87e0fc5f2b452bbc..18797c1b419bf1b1a4582451b40b39eddc3cc4e0 100644 (file)
@@ -283,7 +283,7 @@ put_folio:
        }
        if (install_young_filter)
                damos_destroy_filter(filter);
-       applied = reclaim_pages(&folio_list, true);
+       applied = reclaim_pages(&folio_list);
        cond_resched();
        return applied * PAGE_SIZE;
 }
index 6803c7b17c1f304eab1405f9f03ba9850ce52cbf..2adabe369403649873b0b4597158815d9a20ae36 100644 (file)
@@ -1052,7 +1052,7 @@ extern unsigned long  __must_check vm_mmap_pgoff(struct file *, unsigned long,
         unsigned long, unsigned long);
 
 extern void set_pageblock_order(void);
-unsigned long reclaim_pages(struct list_head *folio_list, bool ignore_references);
+unsigned long reclaim_pages(struct list_head *folio_list);
 unsigned int reclaim_clean_pages_from_list(struct zone *zone,
                                            struct list_head *folio_list);
 /* The ALLOC_WMARK bits are used as an index to zone->watermark */
index 56efea02e26c3fb30c6e25db9dcce261c3e7568c..c8ba3f3eb54d75870bfe864abf62408d654179aa 100644 (file)
@@ -423,7 +423,7 @@ static int madvise_cold_or_pageout_pte_range(pmd_t *pmd,
 huge_unlock:
                spin_unlock(ptl);
                if (pageout)
-                       reclaim_pages(&folio_list, true);
+                       reclaim_pages(&folio_list);
                return 0;
        }
 
@@ -547,7 +547,7 @@ restart:
                pte_unmap_unlock(start_pte, ptl);
        }
        if (pageout)
-               reclaim_pages(&folio_list, true);
+               reclaim_pages(&folio_list);
        cond_resched();
 
        return 0;
index d194e7240df44ab65063a63a300ad0703bdd477b..fe923a4a56bbb731e37211e451c2d766b984670b 100644 (file)
@@ -2133,7 +2133,7 @@ static unsigned int reclaim_folio_list(struct list_head *folio_list,
        return nr_reclaimed;
 }
 
-unsigned long reclaim_pages(struct list_head *folio_list, bool ignore_references)
+unsigned long reclaim_pages(struct list_head *folio_list)
 {
        int nid;
        unsigned int nr_reclaimed = 0;
@@ -2156,11 +2156,11 @@ unsigned long reclaim_pages(struct list_head *folio_list, bool ignore_references
                }
 
                nr_reclaimed += reclaim_folio_list(&node_folio_list, NODE_DATA(nid),
-                                                  ignore_references);
+                                                  true);
                nid = folio_nid(lru_to_folio(folio_list));
        } while (!list_empty(folio_list));
 
-       nr_reclaimed += reclaim_folio_list(&node_folio_list, NODE_DATA(nid), ignore_references);
+       nr_reclaimed += reclaim_folio_list(&node_folio_list, NODE_DATA(nid), true);
 
        memalloc_noreclaim_restore(noreclaim_flag);