From: Minchan Kim <minchan@kernel.org>
To: Rik van Riel <riel@redhat.com>
Cc: Minchan Kim <minchan@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Marek Szyprowski <m.szyprowski@samsung.com>,
Michal Nazarewicz <mina86@mina86.com>,
Mel Gorman <mgorman@suse.de>
Subject: Re: [RFC] mm: support MIGRATE_DISCARD
Date: Sat, 25 Aug 2012 00:20:35 +0900 [thread overview]
Message-ID: <20120824152035.GA2127@barrios> (raw)
In-Reply-To: <503797F0.1050805@redhat.com>
Hi Rik,
On Fri, Aug 24, 2012 at 11:04:16AM -0400, Rik van Riel wrote:
> On 08/24/2012 12:25 AM, Minchan Kim wrote:
> >This patch introudes MIGRATE_DISCARD mode in migration.
> >It drops *unmapped clean cache pages* instead of migration so that
>
> Am I confused, or does the code not match the changelog?
>
> It looks like it is still trying to discard mapped page cache pages:
Embarrassing typo :( "clean cache page" is right.
That includes both mapped/unmapped clean cache pages.
>
> >+ file = page_is_file_cache(page);
> >+ ttu_flags = TTU_IGNORE_ACCESS;
> >+retry:
> >+ if (!(mode & MIGRATE_DISCARD) || !file || PageDirty(page))
> >+ ttu_flags |= (TTU_MIGRATION | TTU_IGNORE_MLOCK);
> >+ else
> >+ discard_mode = true;
> >+
> > /* Establish migration ptes or remove ptes */
> >- try_to_unmap(page, TTU_MIGRATION|TTU_IGNORE_MLOCK|TTU_IGNORE_ACCESS);
> >+ rc = try_to_unmap(page, ttu_flags);
> >
> > skip_unmap:
> >- if (!page_mapped(page))
> >- rc = move_to_new_page(newpage, page, remap_swapcache, mode);
> >+ if (rc == SWAP_SUCCESS) {
> >+ if (!discard_mode)
> >+ rc = move_to_new_page(newpage, page,
> >+ remap_swapcache, mode);
> >+ else {
> >+
> >+ rc = discard_page(page);
> >+ goto uncharge;
> >+ }
>
>
>
> --
> All rights reversed
--
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>
next prev parent reply other threads:[~2012-08-24 15:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-24 4:25 [RFC] mm: support MIGRATE_DISCARD Minchan Kim
2012-08-24 15:04 ` Rik van Riel
2012-08-24 15:20 ` Minchan Kim [this message]
2012-08-24 16:16 ` Michal Nazarewicz
2012-09-05 10:53 ` 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=20120824152035.GA2127@barrios \
--to=minchan@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=m.szyprowski@samsung.com \
--cc=mgorman@suse.de \
--cc=mina86@mina86.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).