Commit 14f5be2a authored by SeongJae Park's avatar SeongJae Park Committed by Andrew Morton
Browse files

mm/vmscan: remove ignore_references argument of reclaim_pages()

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: default avatarSeongJae Park <sj@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent ebd3f70c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -283,7 +283,7 @@ static unsigned long damon_pa_pageout(struct damon_region *r, struct damos *s)
	}
	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;
}
+1 −1
Original line number Diff line number Diff line
@@ -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 */
+2 −2
Original line number Diff line number Diff line
@@ -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 @@ static int madvise_cold_or_pageout_pte_range(pmd_t *pmd,
		pte_unmap_unlock(start_pte, ptl);
	}
	if (pageout)
		reclaim_pages(&folio_list, true);
		reclaim_pages(&folio_list);
	cond_resched();

	return 0;
+3 −3
Original line number Diff line number Diff line
@@ -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);