mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
mm/vmscan: remove ignore_references argument of reclaim_folio_list()
All reclaim_folio_list() callers are passing 'true' for 'ignore_references' parameter. In other words, the parameter is not really being used. Simplify the code by removing the parameter. Link: https://lkml.kernel.org/r/20240429224451.67081-5-sj@kernel.org Signed-off-by: SeongJae Park <sj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
14f5be2a2d
commit
c961bddb7d
1 changed files with 4 additions and 6 deletions
10
mm/vmscan.c
10
mm/vmscan.c
|
@ -2109,8 +2109,7 @@ static void shrink_active_list(unsigned long nr_to_scan,
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned int reclaim_folio_list(struct list_head *folio_list,
|
static unsigned int reclaim_folio_list(struct list_head *folio_list,
|
||||||
struct pglist_data *pgdat,
|
struct pglist_data *pgdat)
|
||||||
bool ignore_references)
|
|
||||||
{
|
{
|
||||||
struct reclaim_stat dummy_stat;
|
struct reclaim_stat dummy_stat;
|
||||||
unsigned int nr_reclaimed;
|
unsigned int nr_reclaimed;
|
||||||
|
@ -2123,7 +2122,7 @@ static unsigned int reclaim_folio_list(struct list_head *folio_list,
|
||||||
.no_demotion = 1,
|
.no_demotion = 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
nr_reclaimed = shrink_folio_list(folio_list, pgdat, &sc, &dummy_stat, ignore_references);
|
nr_reclaimed = shrink_folio_list(folio_list, pgdat, &sc, &dummy_stat, true);
|
||||||
while (!list_empty(folio_list)) {
|
while (!list_empty(folio_list)) {
|
||||||
folio = lru_to_folio(folio_list);
|
folio = lru_to_folio(folio_list);
|
||||||
list_del(&folio->lru);
|
list_del(&folio->lru);
|
||||||
|
@ -2155,12 +2154,11 @@ unsigned long reclaim_pages(struct list_head *folio_list)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
nr_reclaimed += reclaim_folio_list(&node_folio_list, NODE_DATA(nid),
|
nr_reclaimed += reclaim_folio_list(&node_folio_list, NODE_DATA(nid));
|
||||||
true);
|
|
||||||
nid = folio_nid(lru_to_folio(folio_list));
|
nid = folio_nid(lru_to_folio(folio_list));
|
||||||
} while (!list_empty(folio_list));
|
} while (!list_empty(folio_list));
|
||||||
|
|
||||||
nr_reclaimed += reclaim_folio_list(&node_folio_list, NODE_DATA(nid), true);
|
nr_reclaimed += reclaim_folio_list(&node_folio_list, NODE_DATA(nid));
|
||||||
|
|
||||||
memalloc_noreclaim_restore(noreclaim_flag);
|
memalloc_noreclaim_restore(noreclaim_flag);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue