History

mm: handle multiple owners of device private pages in migrate_vma

Add a new src_owner field to struct migrate_vma. If the field is set, only device private pages with page->pgmap->owner equal to that field are migrated. If the field is not set only "normal" pages are migrated.

Christoph Hellwig committed 6 years ago

Commit 800bb1c1 parent f894ddd4 files · +16 −3Browse files

Showing the changes to include/linux (1 of 4 files). Show all

Unified · Split

include/linux/migrate.h+8−0
@@ -196,6 +196,14 @@ struct migrate_vma { · 195 unmodified lines
196 unsigned long npages;196 unsigned long npages;
197 unsigned long start;197 unsigned long start;
198 unsigned long end;198 unsigned long end;
199
200 /*
201 * Set to the owner value also stored in page->pgmap->owner for
202 * migrating out of device private memory. If set only device
203 * private pages with this owner are migrated. If not set
204 * device private pages are not migrated at all.
205 */
206 void *src_owner;
199};207};
200 208
201int migrate_vma_setup(struct migrate_vma *args);209int migrate_vma_setup(struct migrate_vma *args);