linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	Mel Gorman <mgorman@suse.de>, Rik van Riel <riel@redhat.com>,
	David Rientjes <rientjes@google.com>,
	Minchan Kim <minchan@kernel.org>
Subject: Re: [PATCH] mm/compaction: correct to flush migrated pages if pageblock skip happens
Date: Mon, 24 Aug 2015 10:51:29 +0200	[thread overview]
Message-ID: <55DADB11.6070000@suse.cz> (raw)
In-Reply-To: <1440129419-30023-1-git-send-email-iamjoonsoo.kim@lge.com>

On 08/21/2015 05:56 AM, Joonsoo Kim wrote:
> We cache isolate_start_pfn before entering isolate_migratepages().
> If pageblock is skipped in isolate_migratepages() due to whatever reason,
> cc->migrate_pfn could be far from isolate_start_pfn hence flushing pages
> that were freed happens. For example, following scenario can be possible.
>
> - assume order-9 compaction, pageblock order is 9
> - start_isolate_pfn is 0x200
> - isolate_migratepages()
>    - skip a number of pageblocks
>    - start to isolate from pfn 0x600
>    - cc->migrate_pfn = 0x620
>    - return
> - last_migrated_pfn is set to 0x200
> - check flushing condition
>    - current_block_start is set to 0x600
>    - last_migrated_pfn < current_block_start then do useless flush
>
> This wrong flush would not help the performance and success rate so
> this patch try to fix it. One simple way to know exact position
> where we start to isolate migratable pages is that we cache it
> in isolate_migratepages() before entering actual isolation. This patch
> implements it and fix the problem.

Yeah, that should work.

> Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>

Acked-by: Vlastimil Babka <vbabka@suse.cz>


--
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:[~2015-08-24  8:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-21  3:56 [PATCH] mm/compaction: correct to flush migrated pages if pageblock skip happens Joonsoo Kim
2015-08-24  8:51 ` Vlastimil Babka [this message]

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=55DADB11.6070000@suse.cz \
    --to=vbabka@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=minchan@kernel.org \
    --cc=riel@redhat.com \
    --cc=rientjes@google.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).