linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Shaohua Li <shaohua.li@intel.com>
To: Nai Xia <nai.xia@gmail.com>
Cc: Mel Gorman <mgorman@suse.de>, Linux-MM <linux-mm@kvack.org>,
	Andrea Arcangeli <aarcange@redhat.com>,
	Minchan Kim <minchan.kim@gmail.com>, Jan Kara <jack@suse.cz>,
	Andy Isaacson <adi@hexapodia.org>,
	Johannes Weiner <jweiner@redhat.com>,
	Rik van Riel <riel@redhat.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 7/7] mm: compaction: Introduce sync-light migration for use by compaction
Date: Wed, 23 Nov 2011 10:25:49 +0800	[thread overview]
Message-ID: <1322015149.22361.338.camel@sli10-conroe> (raw)
In-Reply-To: <CAPQyPG4DQCxDah5VYMU6PNgeuD_3WJ-zm8XpL7V7BK8hAF8OJg@mail.gmail.com>

On Wed, 2011-11-23 at 10:01 +0800, Nai Xia wrote:
> On Tue, Nov 22, 2011 at 2:56 PM, Shaohua Li <shaohua.li@intel.com> wrote:
> > On Tue, 2011-11-22 at 02:36 +0800, Mel Gorman wrote:
> >> This patch adds a lightweight sync migrate operation MIGRATE_SYNC_LIGHT
> >> mode that avoids writing back pages to backing storage. Async
> >> compaction maps to MIGRATE_ASYNC while sync compaction maps to
> >> MIGRATE_SYNC_LIGHT. For other migrate_pages users such as memory
> >> hotplug, MIGRATE_SYNC is used.
> >>
> >> This avoids sync compaction stalling for an excessive length of time,
> >> particularly when copying files to a USB stick where there might be
> >> a large number of dirty pages backed by a filesystem that does not
> >> support ->writepages.
> > Hi,
> > from my understanding, with this, even writes
> > to /proc/sys/vm/compact_memory doesn't wait for pageout, is this
> > intended?
> > on the other hand, MIGRATE_SYNC_LIGHT now waits for pagelock and buffer
> > lock, so could wait on page read. page read and page out have the same
> > latency, why takes them different?
> 
> So for the problem you raised, I think my suggestion to Mel is to adopt the
> following logic:
> 
>            if (!trylock_page(page) && !PageUptodate(page))
>                       we are quite likely to block on read, so we
>                       depend on yet another MIGRATE_SYNC_MODE to decide
>                       if we really want to lock_page() and wait for this IO.
> 
> How do you think ?
assume the PageUptodate() is at the check for 'goto out'. yes, looks
reasonable to me. And we need similar check for buffer_head.

Thanks,
Shaohua


--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2011-11-23  2:15 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-21 18:36 [RFC PATCH 0/7] Reduce compaction-related stalls and improve asynchronous migration of dirty pages v4r2 Mel Gorman
2011-11-21 18:36 ` [PATCH 1/7] mm: compaction: Allow compaction to isolate dirty pages Mel Gorman
2011-11-22 16:58   ` Minchan Kim
2011-11-21 18:36 ` [PATCH 2/7] mm: compaction: Use synchronous compaction for /proc/sys/vm/compact_memory Mel Gorman
2011-11-22 17:00   ` Minchan Kim
2011-11-21 18:36 ` [PATCH 3/7] mm: check if we isolated a compound page during lumpy scan Mel Gorman
2011-11-22 17:05   ` Minchan Kim
2011-11-21 18:36 ` [PATCH 4/7] mm: compaction: Determine if dirty pages can be migrated without blocking within ->migratepage Mel Gorman
2011-11-21 18:36 ` [PATCH 5/7] mm: compaction: make isolate_lru_page() filter-aware again Mel Gorman
2011-11-22 17:30   ` Minchan Kim
2011-11-23  9:19     ` Mel Gorman
2011-11-21 18:36 ` [PATCH 6/7] mm: page allocator: Limit when direct reclaim is used when compaction is deferred Mel Gorman
2011-11-22 17:50   ` Minchan Kim
2011-11-21 18:36 ` [PATCH 7/7] mm: compaction: Introduce sync-light migration for use by compaction Mel Gorman
2011-11-22  6:56   ` Shaohua Li
2011-11-22 10:14     ` Mel Gorman
2011-11-22 11:54       ` Jan Kara
2011-11-22 13:59         ` Nai Xia
2011-11-22 15:07           ` Nai Xia
2011-11-22 19:13           ` Jan Kara
2011-11-22 22:44             ` Nai Xia
2011-11-23 11:39               ` Jan Kara
2011-11-23 12:20                 ` Nai Xia
2011-11-23  2:01     ` Nai Xia
2011-11-23  2:25       ` Shaohua Li [this message]
2011-11-23 11:00       ` Mel Gorman
2011-11-23 12:51         ` Nai Xia
2011-11-23 13:05         ` Nai Xia
2011-11-23 13:45           ` Mel Gorman
2011-11-23 14:35             ` Nai Xia
2011-11-23 15:08               ` Mel Gorman
2011-11-23 15:23                 ` Nai Xia
2011-11-23 15:57                   ` Mel Gorman

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=1322015149.22361.338.camel@sli10-conroe \
    --to=shaohua.li@intel.com \
    --cc=aarcange@redhat.com \
    --cc=adi@hexapodia.org \
    --cc=jack@suse.cz \
    --cc=jweiner@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=minchan.kim@gmail.com \
    --cc=nai.xia@gmail.com \
    --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).