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: <20160617095030.GB21670@dhcp22.suse.cz>
Date:	Fri, 17 Jun 2016 11:50:31 +0200
From:	Michal Hocko <mhocko@...nel.org>
To:	Ganesh Mahendran <opensource.ganesh@...il.com>
Cc:	linux-mm@...ck.org, linux-kernel@...r.kernel.org,
	akpm@...ux-foundation.org, vbabka@...e.cz, iamjoonsoo.kim@....com,
	hillf.zj@...baba-inc.com, minchan@...nel.org
Subject: Re: [PATCH] mm/compaction: remove local variable is_lru

On Fri 17-06-16 17:32:51, Ganesh Mahendran wrote:
> local varialbe is_lru was used for tracking non-lru pages(such as
> balloon pages).
> 
> But commit
> 112ea7b668d3 ("mm: migrate: support non-lru movable page migration")

this commit sha is not stable because it is from the linux-next tree.

> introduced a common framework for non-lru page migration and moved
> the compound pages check before non-lru movable pages check.
> 
> So there is no need to use local variable is_lru.
> 
> Signed-off-by: Ganesh Mahendran <opensource.ganesh@...il.com>

Other than that the patch looks ok and maybe it would be worth folding
into the mm-migrate-support-non-lru-movable-page-migration.patch

> ---
>  mm/compaction.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/mm/compaction.c b/mm/compaction.c
> index fbb7b38..780be7f 100644
> --- a/mm/compaction.c
> +++ b/mm/compaction.c
> @@ -724,7 +724,6 @@ isolate_migratepages_block(struct compact_control *cc, unsigned long low_pfn,
>  
>  	/* Time to isolate some pages for migration */
>  	for (; low_pfn < end_pfn; low_pfn++) {
> -		bool is_lru;
>  
>  		if (skip_on_failure && low_pfn >= next_skip_pfn) {
>  			/*
> @@ -807,8 +806,7 @@ isolate_migratepages_block(struct compact_control *cc, unsigned long low_pfn,
>  		 * It's possible to migrate LRU and non-lru movable pages.
>  		 * Skip any other type of page
>  		 */
> -		is_lru = PageLRU(page);
> -		if (!is_lru) {
> +		if (!PageLRU(page)) {
>  			/*
>  			 * __PageMovable can return false positive so we need
>  			 * to verify it under page_lock.
> -- 
> 1.9.1
> 

-- 
Michal Hocko
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ