linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Minchan Kim <minchan@kernel.org>
To: Rik van Riel <riel@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Mel Gorman <mel@csn.ul.ie>, Sasha Levin <levinsasha928@gmail.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	jaschut@sandia.gov, kamezawa.hiroyu@jp.fujitsu.com,
	Dave Jones <davej@redhat.com>
Subject: Re: [PATCH -mm v3] mm: have order > 0 compaction start off where it left
Date: Thu, 12 Jul 2012 11:26:22 +0900	[thread overview]
Message-ID: <20120712022622.GA27120@bbox> (raw)
In-Reply-To: <20120711161800.763dbef0@cuia.bos.redhat.com>

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@redhat.com>

Acked-by: Minchan Kim <minchan@kernel.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, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2012-07-12  2:26 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-28 17:55 [PATCH -mm v2] mm: have order > 0 compaction start off where it left Rik van Riel
2012-06-28 20:19 ` Jim Schutt
2012-06-28 20:57   ` Rik van Riel
2012-06-28 20:59 ` Andrew Morton
2012-06-28 21:24   ` Rik van Riel
2012-06-28 21:35     ` Andrew Morton
2012-07-02 17:42       ` Sasha Levin
2012-07-03  0:57         ` Rik van Riel
2012-07-03  2:54           ` Minchan Kim
2012-07-03 10:10           ` Mel Gorman
2012-07-03 21:48             ` Andrew Morton
2012-07-04  2:34               ` Minchan Kim
2012-07-04  7:42                 ` Andrew Morton
2012-07-04  8:01                   ` Minchan Kim
2012-07-11 20:18                     ` [PATCH -mm v3] " Rik van Riel
2012-07-12  2:26                       ` Minchan Kim [this message]
2012-07-04  9:57                   ` [PATCH -mm v2] " Mel Gorman
2012-06-28 23:27 ` Minchan Kim
2012-07-03 14:59   ` Rik van Riel
2012-07-04  2:28     ` Minchan Kim
2012-07-04 10:08       ` Mel Gorman
2012-07-03 20:13   ` [PATCH -mm] mm: minor fixes for compaction Rik van Riel
2012-07-04  2:36     ` Minchan Kim
2012-06-29 10:02 ` [PATCH -mm v2] mm: have order > 0 compaction start off where it left Mel Gorman
2012-06-30  3:51 ` Kamezawa Hiroyuki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120712022622.GA27120@bbox \
    --to=minchan@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=davej@redhat.com \
    --cc=jaschut@sandia.gov \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=levinsasha928@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mel@csn.ul.ie \
    --cc=riel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).