Page Cache Policy V0.0 1/5 add offset arg to migrate_pages_to()
Subsystems (3)
Page Cache Policy V0.0 1/5 add offset arg to migrate_pages_to()
This patch adds a page offset arg to migrate_pages_to() for use in selecting nodes from which to allocate for regions with
interleave policy. This is needed to calculate the correct
node for shmem and generic mmap()ed files using the shared policy infrastructure [subsequent patches]
include/linux/migrate.h +2 -2
@@ -12,8 +12,8 @@ extern void migrate_page_copy(struct pagextern int migrate_page_remove_references (struct page *,struct page *,int );extern int migrate_pages (struct list_head *l,struct list_head *t,struct list_head *moved,struct list_head *failed); -extern int migrate_pages_to (struct list_head *pagelist, -struct vm_area_struct *vma,int dest); +extern int migrate_pages_to (struct list_head *,struct vm_area_struct *, +int ,unsigned long );extern int fail_migrate_page (struct page *,struct page *);extern int migrate_prep (void );
mm/mempolicy.c +3 -2
@@ -604,7 +604,7 @@ int migrate_to_node(struct mm_struct *mm flags | MPOL_MF_DISCONTIG_OK, &pagelist);if (!list_empty (&pagelist)) { - err =migrate_pages_to (&pagelist,NULL , dest); + err =migrate_pages_to (&pagelist,NULL , dest,0L );if (!list_empty (&pagelist))putback_lru_pages (&pagelist); }
@@ -767,7 +767,8 @@ long do_mbind(unsigned long start, unsig err =mbind_range (vma, start, end, new);if (!list_empty (&pagelist)) - nr_failed =migrate_pages_to (&pagelist, vma,-1 ); + nr_failed =migrate_pages_to (&pagelist, vma,-1 , + start - vma->vm_start);if (!err && nr_failed && (flags &MPOL_MF_STRICT )) err = -EIO ;
mm/migrate.c +2 -3
@@ -584,14 +584,13 @@ EXPORT_SYMBOL(buffer_migrate_page);* Specify destination with either non-NULL vma or dest_node >= 0 * Return the number of pages not migrated or error code */ -int migrate_pages_to (struct list_head *pagelist, -struct vm_area_struct *vma,int dest) +int migrate_pages_to (struct list_head *pagelist,struct vm_area_struct *vma, +int dest,unsigned long offset) {LIST_HEAD (newlist);LIST_HEAD (moved);LIST_HEAD (failed);int err =0 ; -unsigned long offset =0 ;int nr_pages;struct page *page;struct list_head *p;
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 7 lines · Lee Schermerhorn
Page Cache Policy V0.0 1/5 add offset arg to
migrate_pages_to()This patch adds a page offset arg to
migrate_pages_to()for use in selecting nodes from which to allocate for regions with
interleave policy. This is needed to calculate the correct
node for shmem and generic mmap()ed files using the shared policy infrastructure [subsequent patches]
Why do we not need this patch? Is it not possible to calculate the interleave node from the inode offset? This is only necessary for the case in which no vma is available right?
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>