Lines Matching refs:migrate

2208 	struct migrate_vma *migrate = walk->private;  in migrate_vma_collect_skip()  local
2212 migrate->dst[migrate->npages] = 0; in migrate_vma_collect_skip()
2213 migrate->src[migrate->npages++] = 0; in migrate_vma_collect_skip()
2224 struct migrate_vma *migrate = walk->private; in migrate_vma_collect_hole() local
2232 migrate->src[migrate->npages] = MIGRATE_PFN_MIGRATE; in migrate_vma_collect_hole()
2233 migrate->dst[migrate->npages] = 0; in migrate_vma_collect_hole()
2234 migrate->npages++; in migrate_vma_collect_hole()
2235 migrate->cpages++; in migrate_vma_collect_hole()
2246 struct migrate_vma *migrate = walk->private; in migrate_vma_collect_pmd() local
2310 migrate->cpages++; in migrate_vma_collect_pmd()
2326 if (!(migrate->flags & in migrate_vma_collect_pmd()
2328 page->pgmap->owner != migrate->pgmap_owner) in migrate_vma_collect_pmd()
2336 if (!(migrate->flags & MIGRATE_VMA_SELECT_SYSTEM)) in migrate_vma_collect_pmd()
2341 migrate->cpages++; in migrate_vma_collect_pmd()
2344 page = vm_normal_page(migrate->vma, addr, pte); in migrate_vma_collect_pmd()
2374 migrate->cpages++; in migrate_vma_collect_pmd()
2414 migrate->dst[migrate->npages] = 0; in migrate_vma_collect_pmd()
2415 migrate->src[migrate->npages++] = mpfn; in migrate_vma_collect_pmd()
2440 static void migrate_vma_collect(struct migrate_vma *migrate) in migrate_vma_collect() argument
2450 migrate->vma, migrate->vma->vm_mm, migrate->start, migrate->end, in migrate_vma_collect()
2451 migrate->pgmap_owner); in migrate_vma_collect()
2454 walk_page_range(migrate->vma->vm_mm, migrate->start, migrate->end, in migrate_vma_collect()
2455 &migrate_vma_walk_ops, migrate); in migrate_vma_collect()
2458 migrate->end = migrate->start + (migrate->npages << PAGE_SHIFT); in migrate_vma_collect()
2525 static void migrate_vma_unmap(struct migrate_vma *migrate) in migrate_vma_unmap() argument
2527 const unsigned long npages = migrate->npages; in migrate_vma_unmap()
2528 const unsigned long start = migrate->start; in migrate_vma_unmap()
2535 struct page *page = migrate_pfn_to_page(migrate->src[i]); in migrate_vma_unmap()
2549 migrate->src[i] &= ~MIGRATE_PFN_MIGRATE; in migrate_vma_unmap()
2550 migrate->cpages--; in migrate_vma_unmap()
2568 migrate->src[i] &= ~MIGRATE_PFN_MIGRATE; in migrate_vma_unmap()
2569 migrate->cpages--; in migrate_vma_unmap()
2576 struct page *page = migrate_pfn_to_page(migrate->src[i]); in migrate_vma_unmap()
2578 if (!page || (migrate->src[i] & MIGRATE_PFN_MIGRATE)) in migrate_vma_unmap()
2583 migrate->src[i] = 0; in migrate_vma_unmap()
2700 static void migrate_vma_insert_page(struct migrate_vma *migrate, in migrate_vma_insert_page() argument
2705 struct vm_area_struct *vma = migrate->vma; in migrate_vma_insert_page()
2844 void migrate_vma_pages(struct migrate_vma *migrate) in migrate_vma_pages() argument
2846 const unsigned long npages = migrate->npages; in migrate_vma_pages()
2847 const unsigned long start = migrate->start; in migrate_vma_pages()
2853 struct page *newpage = migrate_pfn_to_page(migrate->dst[i]); in migrate_vma_pages()
2854 struct page *page = migrate_pfn_to_page(migrate->src[i]); in migrate_vma_pages()
2859 migrate->src[i] &= ~MIGRATE_PFN_MIGRATE; in migrate_vma_pages()
2864 if (!(migrate->src[i] & MIGRATE_PFN_MIGRATE)) in migrate_vma_pages()
2870 MMU_NOTIFY_MIGRATE, 0, migrate->vma, in migrate_vma_pages()
2871 migrate->vma->vm_mm, addr, migrate->end, in migrate_vma_pages()
2872 migrate->pgmap_owner); in migrate_vma_pages()
2875 migrate_vma_insert_page(migrate, addr, newpage, in migrate_vma_pages()
2876 &migrate->src[i]); in migrate_vma_pages()
2889 migrate->src[i] &= ~MIGRATE_PFN_MIGRATE; in migrate_vma_pages()
2897 migrate->src[i] &= ~MIGRATE_PFN_MIGRATE; in migrate_vma_pages()
2904 migrate->src[i] &= ~MIGRATE_PFN_MIGRATE; in migrate_vma_pages()
2928 void migrate_vma_finalize(struct migrate_vma *migrate) in migrate_vma_finalize() argument
2930 const unsigned long npages = migrate->npages; in migrate_vma_finalize()
2934 struct page *newpage = migrate_pfn_to_page(migrate->dst[i]); in migrate_vma_finalize()
2935 struct page *page = migrate_pfn_to_page(migrate->src[i]); in migrate_vma_finalize()
2945 if (!(migrate->src[i] & MIGRATE_PFN_MIGRATE) || !newpage) { in migrate_vma_finalize()