Re: [PATCH 6/8] Direct Migration V2: Avoid writeback / page_migrate() method

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Christoph Lameter writes:
 > Migrate a page with buffers without requiring writeback
 > 
 > This introduces a new address space operation migrate_page() that
 > may be used by a filesystem to implement its own version of page migration.
 > 
 > A version is provided that migrates buffers attached to pages. Some
 > filesystems (ext2, ext3, xfs) are modified to utilize this feature.
 > 
 > The swapper address space operation are modified so that a regular
 > migrate_pages() will occur for anonymous pages without writeback
 > (migrate_pages forces every anonymous page to have a swap entry).
 > 
 > V1->V2:
 > - Fix CONFIG_MIGRATION handling
 > 
 > Signed-off-by: Mike Kravetz <[email protected]>
 > Signed-off-by: Christoph Lameter <[email protected]>
 > 
 > Index: linux-2.6.14-mm1/include/linux/fs.h
 > ===================================================================
 > --- linux-2.6.14-mm1.orig/include/linux/fs.h	2005-11-07 11:48:46.000000000 -0800
 > +++ linux-2.6.14-mm1/include/linux/fs.h	2005-11-08 10:18:51.000000000 -0800
 > @@ -332,6 +332,8 @@ struct address_space_operations {
 >  			loff_t offset, unsigned long nr_segs);
 >  	struct page* (*get_xip_page)(struct address_space *, sector_t,
 >  			int);
 > +	/* migrate the contents of a page to the specified target */
 > +	int (*migrate_page) (struct page *, struct page *);
 >  };
 >  
 >  struct backing_dev_info;
 > @@ -1679,6 +1681,12 @@ extern void simple_release_fs(struct vfs
 >  
 >  extern ssize_t simple_read_from_buffer(void __user *, size_t, loff_t *, const void *, size_t);
 >  
 > +#ifdef CONFIG_MIGRATION
 > +extern int buffer_migrate_page(struct page *, struct page *);
 > +#else
 > +#define buffer_migrate_page(a,b) NULL
 > +#endif

Depending on the CONFIG_MIGRATION, the type of buffer_migrate_page(a,b)
expansion is either int or void *, which doesn't look right.

Moreover below you have initializations

        .migrate_page		= buffer_migrate_page,

that wouldn't compile when CONFIG_MIGRATION is not defined (as macro
requires two arguments).

Nikita.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux