From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: Christoph Lameter <cl@linux.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
Mel Gorman <mel@csn.ul.ie>,
Linus Torvalds <torvalds@linux-foundation.org>,
Linux-MM <linux-mm@kvack.org>,
LKML <linux-kernel@vger.kernel.org>,
Minchan Kim <minchan.kim@gmail.com>,
Andrea Arcangeli <aarcange@redhat.com>,
Rik van Riel <riel@redhat.com>,
Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH] mm,migration: Avoid race between shift_arg_pages() and rmap_walk() during migration by not migrating temporary stacks
Date: Thu, 13 May 2010 09:19:30 +0900 [thread overview]
Message-ID: <20100513091930.9b42e3b8.kamezawa.hiroyu@jp.fujitsu.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1005121627020.1273@router.home>
On Wed, 12 May 2010 16:33:12 -0500 (CDT)
Christoph Lameter <cl@linux.com> wrote:
>
> Still think this special casing is not that good.
>
> One can also disable migration by providing a migration function that
> always fails. One such function exists in mm/migrate.c:
>
> /* Always fail migration. Used for mappings that are not movable */
> int fail_migrate_page(struct address_space *mapping,
> struct page *newpage, struct page *page)
> {
> return -EIO;
> }
> EXPORT_SYMBOL(fail_migrate_page);
>
>
> The migration function is specified in
>
> vma->vm_ops->migrate
>
> If that is set to fail_migrate_page() then the pages in the vma will never
> be migrated. XFS uses it f.e. to avoid page migration:
>
> STATIC int
> xfs_mapping_buftarg(
> xfs_buftarg_t *btp,
> struct block_device *bdev)
> {
> struct backing_dev_info *bdi;
> struct inode *inode;
> struct address_space *mapping;
> static const struct address_space_operations mapping_aops = {
> .sync_page = block_sync_page,
> .migratepage = fail_migrate_page,
> };
>
>
>
> Would it not be possible to do something similar for the temporary stack?
>
Problem here is unmap->remap. ->migratepage() function is used as
unmap
-> migratepage()
-> failed
-> remap
Then, migratepage() itself is no help. We need some check-callback before unmap
or lock to wait for an event we can make remapping progress.
Thanks,
-Kame
--
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:[~2010-05-13 0:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-11 8:57 Mel Gorman
2010-05-11 12:10 ` Rik van Riel
2010-05-11 17:11 ` Linus Torvalds
2010-05-11 17:21 ` Rik van Riel
2010-05-12 0:23 ` KOSAKI Motohiro
2010-05-12 19:54 ` Andrew Morton
2010-05-12 20:51 ` Mel Gorman
2010-05-12 20:58 ` Andrew Morton
2010-05-12 23:06 ` KOSAKI Motohiro
2010-05-12 21:33 ` Christoph Lameter
2010-05-13 0:19 ` KAMEZAWA Hiroyuki [this message]
2010-05-13 17:22 ` Christoph Lameter
2010-05-13 23:51 ` KAMEZAWA Hiroyuki
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=20100513091930.9b42e3b8.kamezawa.hiroyu@jp.fujitsu.com \
--to=kamezawa.hiroyu@jp.fujitsu.com \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mel@csn.ul.ie \
--cc=minchan.kim@gmail.com \
--cc=peterz@infradead.org \
--cc=riel@redhat.com \
--cc=torvalds@linux-foundation.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