search for: migrate_vma_prepare

Displaying 8 results from an estimated 8 matches for "migrate_vma_prepare".

2019 Aug 16
2
[PATCH 01/10] mm: turn migrate_vma upside down
...* * Once the caller is done cleaning up things and updating its page table (if it * chose to do so, this is not an obligation) it finally calls @@ -2657,10 +2656,11 @@ int migrate_vma_setup(struct migrate_vma *args) args->npages = 0; migrate_vma_collect(args); - if (args->cpages) - migrate_vma_prepare(args); - if (args->cpages) - migrate_vma_unmap(args); + if (!args->cpages) + return 0; + + migrate_vma_prepare(args); + migrate_vma_unmap(args); /* * At this point pages are locked and unmapped, and thus they have
2019 Aug 17
0
[PATCH 01/10] mm: turn migrate_vma upside down
On Fri, Aug 16, 2019 at 05:11:07PM +0000, Jason Gunthorpe wrote: > - if (args->cpages) > - migrate_vma_prepare(args); > - if (args->cpages) > - migrate_vma_unmap(args); > + if (!args->cpages) > + return 0; > + > + migrate_vma_prepare(args); > + migrate_vma_unmap(args); I don't think this is ok. Both migrate_vma_prepare and migrate_vma_unmap can reduce args->cpages, incl...
2019 Aug 14
20
turn hmm migrate_vma upside down v3
Hi Jérôme, Ben and Jason, below is a series against the hmm tree which starts revamping the migrate_vma functionality. The prime idea is to export three slightly lower level functions and thus avoid the need for migrate_vma_ops callbacks. Diffstat: 7 files changed, 282 insertions(+), 614 deletions(-) A git tree is also available at: git://git.infradead.org/users/hch/misc.git
2019 Jul 29
0
[PATCH 1/9] mm: turn migrate_vma upside down
...INVAL; + if (args->end <= args->vma->vm_start || args->end > args->vma->vm_end) + return -EINVAL; + if (!args->src || !args->dst) + return -EINVAL; + + memset(args->src, 0, sizeof(*args->src) * nr_pages); + + migrate_vma_collect(args); + if (args->cpages) + migrate_vma_prepare(args); + if (args->cpages) + migrate_vma_unmap(args); + + /* + * At this point pages are locked and unmapped, and thus they have + * stable content and can safely be copied to destination memory that + * is allocated by the drivers. + */ + return 0; + +} +EXPORT_SYMBOL(migrate_vma_setup); +...
2019 Aug 14
0
[PATCH 01/10] mm: turn migrate_vma upside down
...gt;vm_start || args->end > args->vma->vm_end) + return -EINVAL; + if (!args->src || !args->dst) + return -EINVAL; + + memset(args->src, 0, sizeof(*args->src) * nr_pages); + args->cpages = 0; + args->npages = 0; + + migrate_vma_collect(args); + if (args->cpages) + migrate_vma_prepare(args); + if (args->cpages) + migrate_vma_unmap(args); + + /* + * At this point pages are locked and unmapped, and thus they have + * stable content and can safely be copied to destination memory that + * is allocated by the drivers. + */ + return 0; + +} +EXPORT_SYMBOL(migrate_vma_setup); +...
2019 Jul 31
1
[PATCH 1/9] mm: turn migrate_vma upside down
...>vm_start || args->end > args->vma->vm_end) > + return -EINVAL; > + if (!args->src || !args->dst) > + return -EINVAL; > + > + memset(args->src, 0, sizeof(*args->src) * nr_pages); > + > + migrate_vma_collect(args); > + if (args->cpages) > + migrate_vma_prepare(args); > + if (args->cpages) > + migrate_vma_unmap(args); > + > + /* > + * At this point pages are locked and unmapped, and thus they have > + * stable content and can safely be copied to destination memory that > + * is allocated by the drivers. > + */ > + return...
2019 Jul 29
24
turn the hmm migrate_vma upside down
Hi Jérôme, Ben and Jason, below is a series against the hmm tree which starts revamping the migrate_vma functionality. The prime idea is to export three slightly lower level functions and thus avoid the need for migrate_vma_ops callbacks. Diffstat: 4 files changed, 285 insertions(+), 602 deletions(-) A git tree is also available at: git://git.infradead.org/users/hch/misc.git
2019 Aug 08
10
turn hmm migrate_vma upside down v2
Hi Jérôme, Ben and Jason, below is a series against the hmm tree which starts revamping the migrate_vma functionality. The prime idea is to export three slightly lower level functions and thus avoid the need for migrate_vma_ops callbacks. Diffstat: 5 files changed, 281 insertions(+), 607 deletions(-) A git tree is also available at: git://git.infradead.org/users/hch/misc.git