lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150921161806.GE19811@dhcp22.suse.cz>
Date:	Mon, 21 Sep 2015 18:18:07 +0200
From:	Michal Hocko <mhocko@...nel.org>
To:	Yaowei Bai <bywxiaobai@....com>
Cc:	akpm@...ux-foundation.org, mgorman@...e.de, rientjes@...gle.com,
	hannes@...xchg.org, vdavydov@...allels.com, oleg@...hat.com,
	vbabka@...e.cz, iamjoonsoo.kim@....com, zhangyanfei@...fujitsu.com,
	linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] mm/vmscan: make inactive_anon_is_low_global return
 directly

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@....com>
> ---
>  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@...ck.org.  For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont@...ck.org"> email@...ck.org </a>

-- 
Michal Hocko
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ