Skip to content

Commit

Permalink
mm/vmscan.c: change prototype for shrink_page_list
Browse files Browse the repository at this point in the history
commit 3c710c1 ("mm, vmscan extract shrink_page_list reclaim counters
into a struct") changed data type for the function, so changing return
type for funciton and its caller.

Signed-off-by: Vaneet Narang <[email protected]>
Signed-off-by: Maninder Singh <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Acked-by: Michal Hocko <[email protected]>
Cc: Amit Sahrawat <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: Vlastimil Babka <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
maninder42 authored and torvalds committed Jun 4, 2020
1 parent 1f318a9 commit 730ec8c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion mm/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,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_clean_pages_from_list(struct zone *zone,
unsigned int reclaim_clean_pages_from_list(struct zone *zone,
struct list_head *page_list);
/* The ALLOC_WMARK bits are used as an index to zone->watermark */
#define ALLOC_WMARK_MIN WMARK_MIN
Expand Down
2 changes: 1 addition & 1 deletion mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -8355,7 +8355,7 @@ static int __alloc_contig_migrate_range(struct compact_control *cc,
unsigned long start, unsigned long end)
{
/* This function is based on compact_zone() from compaction.c. */
unsigned long nr_reclaimed;
unsigned int nr_reclaimed;
unsigned long pfn = start;
unsigned int tries = 0;
int ret = 0;
Expand Down
24 changes: 12 additions & 12 deletions mm/vmscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1066,17 +1066,17 @@ static void page_check_dirty_writeback(struct page *page,
/*
* shrink_page_list() returns the number of reclaimed pages
*/
static unsigned long shrink_page_list(struct list_head *page_list,
struct pglist_data *pgdat,
struct scan_control *sc,
enum ttu_flags ttu_flags,
struct reclaim_stat *stat,
bool ignore_references)
static unsigned int shrink_page_list(struct list_head *page_list,
struct pglist_data *pgdat,
struct scan_control *sc,
enum ttu_flags ttu_flags,
struct reclaim_stat *stat,
bool ignore_references)
{
LIST_HEAD(ret_pages);
LIST_HEAD(free_pages);
unsigned nr_reclaimed = 0;
unsigned pgactivate = 0;
unsigned int nr_reclaimed = 0;
unsigned int pgactivate = 0;

memset(stat, 0, sizeof(*stat));
cond_resched();
Expand Down Expand Up @@ -1487,7 +1487,7 @@ static unsigned long shrink_page_list(struct list_head *page_list,
return nr_reclaimed;
}

unsigned long reclaim_clean_pages_from_list(struct zone *zone,
unsigned int reclaim_clean_pages_from_list(struct zone *zone,
struct list_head *page_list)
{
struct scan_control sc = {
Expand All @@ -1496,7 +1496,7 @@ unsigned long reclaim_clean_pages_from_list(struct zone *zone,
.may_unmap = 1,
};
struct reclaim_stat stat;
unsigned long nr_reclaimed;
unsigned int nr_reclaimed;
struct page *page, *next;
LIST_HEAD(clean_pages);

Expand Down Expand Up @@ -1910,7 +1910,7 @@ shrink_inactive_list(unsigned long nr_to_scan, struct lruvec *lruvec,
{
LIST_HEAD(page_list);
unsigned long nr_scanned;
unsigned long nr_reclaimed = 0;
unsigned int nr_reclaimed = 0;
unsigned long nr_taken;
struct reclaim_stat stat;
int file = is_file_lru(lru);
Expand Down Expand Up @@ -2106,7 +2106,7 @@ static void shrink_active_list(unsigned long nr_to_scan,
unsigned long reclaim_pages(struct list_head *page_list)
{
int nid = NUMA_NO_NODE;
unsigned long nr_reclaimed = 0;
unsigned int nr_reclaimed = 0;
LIST_HEAD(node_page_list);
struct reclaim_stat dummy_stat;
struct page *page;
Expand Down

0 comments on commit 730ec8c

Please sign in to comment.