From: Rik van Riel <riel@redhat.com>
To: Minchan Kim <minchan@kernel.org>
Cc: 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: Fri, 24 Aug 2012 11:04:16 -0400 [thread overview]
Message-ID: <503797F0.1050805@redhat.com> (raw)
In-Reply-To: <1345782330-23234-1-git-send-email-minchan@kernel.org>
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:
> + 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:04 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 [this message]
2012-08-24 15:20 ` Minchan Kim
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=503797F0.1050805@redhat.com \
--to=riel@redhat.com \
--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=minchan@kernel.org \
/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).