From: Mel Gorman <mgorman@suse.de>
To: Minchan Kim <minchan.kim@gmail.com>
Cc: Linux-MM <linux-mm@kvack.org>,
Andrea Arcangeli <aarcange@redhat.com>, Jan Kara <jack@suse.cz>,
Andy Isaacson <adi@hexapodia.org>,
Johannes Weiner <jweiner@redhat.com>,
Rik van Riel <riel@redhat.com>, Nai Xia <nai.xia@gmail.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 5/7] mm: compaction: make isolate_lru_page() filter-aware again
Date: Wed, 23 Nov 2011 09:19:33 +0000 [thread overview]
Message-ID: <20111123091933.GL19415@suse.de> (raw)
In-Reply-To: <20111122173018.GD15253@barrios-laptop.redhat.com>
On Wed, Nov 23, 2011 at 02:30:18AM +0900, Minchan Kim wrote:
> > <SNIP>
> > + /*
> > + * To minimise LRU disruption, the caller can indicate that it only
> > + * wants to isolate pages it will be able to operate on without
> > + * blocking - clean pages for the most part.
> > + *
> > + * ISOLATE_CLEAN means that only clean pages should be isolated. This
> > + * is used by reclaim when it is cannot write to backing storage
> > + *
> > + * ISOLATE_ASYNC_MIGRATE is used to indicate that it only wants to pages
> > + * that it is possible to migrate without blocking with a ->migratepage
> > + * handler
> > + */
> > + if (mode & (ISOLATE_CLEAN|ISOLATE_ASYNC_MIGRATE)) {
> > + /* All the caller can do on PageWriteback is block */
> > + if (PageWriteback(page))
> > + return ret;
> > +
> > + if (PageDirty(page)) {
> > + struct address_space *mapping;
> > +
> > + /* ISOLATE_CLEAN means only clean pages */
> > + if (mode & ISOLATE_CLEAN)
> > + return ret;
> > +
> > + /*
> > + * Only the ->migratepage callback knows if a dirty
> > + * page can be migrated without blocking. Skip the
> > + * page unless there is a ->migratepage callback.
> > + */
> > + mapping = page_mapping(page);
> > + if (!mapping || !mapping->a_ops->migratepage)
>
> I didn't review 4/7 carefully yet.
Thanks for reviewing the others.
> In case of page_mapping is NULL, move_to_new_page calls migrate_page
> which is non-blocking function. So, I guess it could be migrated without blocking.
>
Well spotted
/*
* Only pages without mappings or that have a
* ->migratepage callback are possible to
* migrate without blocking
*/
mapping = page_mapping(page);
if (mapping && !mapping->a_ops->migratepage)
return ret;
--
Mel Gorman
SUSE Labs
--
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>
WARNING: multiple messages have this Message-ID (diff)
From: Mel Gorman <mgorman@suse.de>
To: Minchan Kim <minchan.kim@gmail.com>
Cc: Linux-MM <linux-mm@kvack.org>,
Andrea Arcangeli <aarcange@redhat.com>, Jan Kara <jack@suse.cz>,
Andy Isaacson <adi@hexapodia.org>,
Johannes Weiner <jweiner@redhat.com>,
Rik van Riel <riel@redhat.com>, Nai Xia <nai.xia@gmail.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 5/7] mm: compaction: make isolate_lru_page() filter-aware again
Date: Wed, 23 Nov 2011 09:19:33 +0000 [thread overview]
Message-ID: <20111123091933.GL19415@suse.de> (raw)
In-Reply-To: <20111122173018.GD15253@barrios-laptop.redhat.com>
On Wed, Nov 23, 2011 at 02:30:18AM +0900, Minchan Kim wrote:
> > <SNIP>
> > + /*
> > + * To minimise LRU disruption, the caller can indicate that it only
> > + * wants to isolate pages it will be able to operate on without
> > + * blocking - clean pages for the most part.
> > + *
> > + * ISOLATE_CLEAN means that only clean pages should be isolated. This
> > + * is used by reclaim when it is cannot write to backing storage
> > + *
> > + * ISOLATE_ASYNC_MIGRATE is used to indicate that it only wants to pages
> > + * that it is possible to migrate without blocking with a ->migratepage
> > + * handler
> > + */
> > + if (mode & (ISOLATE_CLEAN|ISOLATE_ASYNC_MIGRATE)) {
> > + /* All the caller can do on PageWriteback is block */
> > + if (PageWriteback(page))
> > + return ret;
> > +
> > + if (PageDirty(page)) {
> > + struct address_space *mapping;
> > +
> > + /* ISOLATE_CLEAN means only clean pages */
> > + if (mode & ISOLATE_CLEAN)
> > + return ret;
> > +
> > + /*
> > + * Only the ->migratepage callback knows if a dirty
> > + * page can be migrated without blocking. Skip the
> > + * page unless there is a ->migratepage callback.
> > + */
> > + mapping = page_mapping(page);
> > + if (!mapping || !mapping->a_ops->migratepage)
>
> I didn't review 4/7 carefully yet.
Thanks for reviewing the others.
> In case of page_mapping is NULL, move_to_new_page calls migrate_page
> which is non-blocking function. So, I guess it could be migrated without blocking.
>
Well spotted
/*
* Only pages without mappings or that have a
* ->migratepage callback are possible to
* migrate without blocking
*/
mapping = page_mapping(page);
if (mapping && !mapping->a_ops->migratepage)
return ret;
--
Mel Gorman
SUSE Labs
next prev parent reply other threads:[~2011-11-23 9:19 UTC|newest]
Thread overview: 66+ 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 ` Mel Gorman
2011-11-21 18:36 ` [PATCH 1/7] mm: compaction: Allow compaction to isolate dirty pages Mel Gorman
2011-11-21 18:36 ` Mel Gorman
2011-11-22 16:58 ` Minchan Kim
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-21 18:36 ` Mel Gorman
2011-11-22 17:00 ` Minchan Kim
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-21 18:36 ` Mel Gorman
2011-11-22 17:05 ` Minchan Kim
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 ` Mel Gorman
2011-11-21 18:36 ` [PATCH 5/7] mm: compaction: make isolate_lru_page() filter-aware again Mel Gorman
2011-11-21 18:36 ` Mel Gorman
2011-11-22 17:30 ` Minchan Kim
2011-11-22 17:30 ` Minchan Kim
2011-11-23 9:19 ` Mel Gorman [this message]
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-21 18:36 ` Mel Gorman
2011-11-22 17:50 ` Minchan Kim
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-21 18:36 ` Mel Gorman
2011-11-22 6:56 ` Shaohua Li
2011-11-22 6:56 ` Shaohua Li
2011-11-22 10:14 ` Mel Gorman
2011-11-22 10:14 ` Mel Gorman
2011-11-22 11:54 ` Jan Kara
2011-11-22 11:54 ` Jan Kara
2011-11-22 13:59 ` Nai Xia
2011-11-22 13:59 ` Nai Xia
2011-11-22 15:07 ` Nai Xia
2011-11-22 15:07 ` Nai Xia
2011-11-22 19:13 ` Jan Kara
2011-11-22 19:13 ` Jan Kara
2011-11-22 22:44 ` Nai Xia
2011-11-22 22:44 ` Nai Xia
2011-11-23 11:39 ` Jan Kara
2011-11-23 11:39 ` Jan Kara
2011-11-23 12:20 ` Nai Xia
2011-11-23 12:20 ` Nai Xia
2011-11-23 2:01 ` Nai Xia
2011-11-23 2:01 ` Nai Xia
2011-11-23 2:25 ` Shaohua Li
2011-11-23 2:25 ` Shaohua Li
2011-11-23 11:00 ` Mel Gorman
2011-11-23 11:00 ` Mel Gorman
2011-11-23 12:51 ` Nai Xia
2011-11-23 12:51 ` Nai Xia
2011-11-23 13:05 ` Nai Xia
2011-11-23 13:05 ` Nai Xia
2011-11-23 13:45 ` Mel Gorman
2011-11-23 13:45 ` Mel Gorman
2011-11-23 14:35 ` Nai Xia
2011-11-23 14:35 ` Nai Xia
2011-11-23 15:08 ` Mel Gorman
2011-11-23 15:08 ` Mel Gorman
2011-11-23 15:23 ` Nai Xia
2011-11-23 15:23 ` Nai Xia
2011-11-23 15:57 ` Mel Gorman
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=20111123091933.GL19415@suse.de \
--to=mgorman@suse.de \
--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=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.