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] [day] [month] [year] [list]
Message-ID: <20120712022622.GA27120@bbox>
Date:	Thu, 12 Jul 2012 11:26:22 +0900
From:	Minchan Kim <minchan@...nel.org>
To:	Rik van Riel <riel@...hat.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Mel Gorman <mel@....ul.ie>,
	Sasha Levin <levinsasha928@...il.com>, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org, jaschut@...dia.gov,
	kamezawa.hiroyu@...fujitsu.com, Dave Jones <davej@...hat.com>
Subject: Re: [PATCH -mm v3] mm: have order > 0 compaction start off where it
 left

Hi Rik,

On Wed, Jul 11, 2012 at 04:18:00PM -0400, Rik van Riel wrote:
> This patch makes the comment for cc->wrapped longer, explaining
> what is really going on. It also incorporates the comment fix
> pointed out by Minchan.
> 
> Additionally, Minchan found that, when no pages get isolated,
> high_pte could be a value that is much lower than desired,

s/high_pte/high_pfn

> which might potentially cause compaction to skip a range of
> pages.
> 
> Only assign zone->compact_cache_free_pfn if we actually
> isolated free pages for compaction.
> 
> Split out the calculation to get the start of the last page
> block in a zone into its own, commented function.
> 
> Signed-off-by: Rik van Riel <riel@...hat.com>

Acked-by: Minchan Kim <minchan@...nel.org>

> ---
>  include/linux/mmzone.h |    2 +-
>  mm/compaction.c        |   30 ++++++++++++++++++++++--------
>  mm/internal.h          |    6 +++++-
>  3 files changed, 28 insertions(+), 10 deletions(-)
> 
> diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
> index e629594..e957fa1 100644
> --- a/include/linux/mmzone.h
> +++ b/include/linux/mmzone.h
> @@ -370,7 +370,7 @@ struct zone {
>  	spinlock_t		lock;
>  	int                     all_unreclaimable; /* All pages pinned */
>  #if defined CONFIG_COMPACTION || defined CONFIG_CMA
> -	/* pfn where the last order > 0 compaction isolated free pages */
> +	/* pfn where the last incremental compaction isolated free pages */
>  	unsigned long		compact_cached_free_pfn;
>  #endif
>  #ifdef CONFIG_MEMORY_HOTPLUG
> diff --git a/mm/compaction.c b/mm/compaction.c
> index 2668b77..3812c3e 100644
> --- a/mm/compaction.c
> +++ b/mm/compaction.c
> @@ -472,10 +472,11 @@ static void isolate_freepages(struct zone *zone,
>  		 * looking for free pages, the search will restart here as
>  		 * page migration may have returned some pages to the allocator
>  		 */
> -		if (isolated)
> +		if (isolated) {
>  			high_pfn = max(high_pfn, pfn);
> -		if (cc->order > 0)
> -			zone->compact_cached_free_pfn = high_pfn;
> +			if (cc->order > 0)
> +				zone->compact_cached_free_pfn = high_pfn;
> +		}
>  	}
>  
>  	/* split_free_page does not map the pages */
> @@ -569,6 +570,21 @@ static isolate_migrate_t isolate_migratepages(struct zone *zone,
>  	return ISOLATE_SUCCESS;
>  }
>  
> +/*
> + * Returns the start pfn of the laste page block in a zone.

s/laste/last/



--
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