Re: [PATCH 1/1] mm/vmscan.c: change prototype for shrink_page_list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed 29-04-20 11:29:27, Maninder Singh wrote:
> 'commit 3c710c1ad11b ("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 <v.narang@xxxxxxxxxxx>
> Signed-off-by: Maninder Singh <maninder1.s@xxxxxxxxxxx>

Acked-by: Michal Hocko <mhocko@xxxxxxxx>

Is there any reason to move declarations here?

> -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)
>  {
> +	unsigned int ret;
>  	struct scan_control sc = {
>  		.gfp_mask = GFP_KERNEL,
>  		.priority = DEF_PRIORITY,
>  		.may_unmap = 1,
>  	};
>  	struct reclaim_stat dummy_stat;
> -	unsigned long ret;
>  	struct page *page, *next;
>  	LIST_HEAD(clean_pages);
>  
> @@ -1900,13 +1900,13 @@ static int current_may_throttle(void)
>  {
>  	LIST_HEAD(page_list);
>  	unsigned long nr_scanned;
> -	unsigned long nr_reclaimed = 0;
>  	unsigned long nr_taken;
>  	struct reclaim_stat stat;
>  	int file = is_file_lru(lru);
>  	enum vm_event_item item;
>  	struct pglist_data *pgdat = lruvec_pgdat(lruvec);
>  	struct zone_reclaim_stat *reclaim_stat = &lruvec->reclaim_stat;
> +	unsigned int nr_reclaimed = 0;
>  	bool stalled = false;
>  
>  	while (unlikely(too_many_isolated(pgdat, file, sc))) {
> @@ -2096,7 +2096,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;
> -- 
> 1.9.1

-- 
Michal Hocko
SUSE Labs




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux