[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20100513091930.9b42e3b8.kamezawa.hiroyu@jp.fujitsu.com>
Date: Thu, 13 May 2010 09:19:30 +0900
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To: Christoph Lameter <cl@...ux.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
Mel Gorman <mel@....ul.ie>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Linux-MM <linux-mm@...ck.org>,
LKML <linux-kernel@...r.kernel.org>,
Minchan Kim <minchan.kim@...il.com>,
Andrea Arcangeli <aarcange@...hat.com>,
Rik van Riel <riel@...hat.com>,
Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH] mm,migration: Avoid race between shift_arg_pages() and
rmap_walk() during migration by not migrating temporary stacks
On Wed, 12 May 2010 16:33:12 -0500 (CDT)
Christoph Lameter <cl@...ux.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 from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists