Re: [PATCH 1/3] mm/vmscan: make inactive_anon_is_low_global return directly

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

 



On Wed 16-09-15 19:59:58, Yaowei Bai wrote:
> Delete unnecessary if to let inactive_anon_is_low_global return
> directly.
> 
> No functional changes.

Is this really an improvement? I am not so sure. If anything the
function has a bool return semantic...

> Signed-off-by: Yaowei Bai <bywxiaobai@xxxxxxx>
> ---
>  mm/vmscan.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index 2d978b2..2785d8e 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -1866,10 +1866,7 @@ static int inactive_anon_is_low_global(struct zone *zone)
>  	active = zone_page_state(zone, NR_ACTIVE_ANON);
>  	inactive = zone_page_state(zone, NR_INACTIVE_ANON);
>  
> -	if (inactive * zone->inactive_ratio < active)
> -		return 1;
> -
> -	return 0;
> +	return inactive * zone->inactive_ratio < active;
>  }
>  
>  /**
> -- 
> 1.9.1
> 
> 
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>

-- 
Michal Hocko
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



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