lkml.org 
[lkml]   [2010]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mm,migration: Avoid race between shift_arg_pages() and rmap_walk() during migration by not migrating temporary stacks

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?


\
 
 \ /
  Last update: 2010-05-12 23:37    [W:0.088 / U:6.948 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site