Displaying 11 results from an estimated 11 matches for "migrate_vma_from_device_private".
2020 Jul 06
0
[PATCH 2/5] mm/migrate: add a direction parameter to migrate_vma
...;
+ mig.dir = MIGRATE_VMA_FROM_SYSTEM;
/*
* We come here with mmap_lock write lock held just for
@@ -578,6 +579,7 @@ kvmppc_svm_page_out(struct vm_area_struct *vma, unsigned long start,
mig.src = &src_pfn;
mig.dst = &dst_pfn;
mig.src_owner = &kvmppc_uvmem_pgmap;
+ mig.dir = MIGRATE_VMA_FROM_DEVICE_PRIVATE;
mutex_lock(&kvm->arch.uvmem_lock);
/* The requested page is already paged-out, nothing to do */
diff --git a/drivers/gpu/drm/nouveau/nouveau_dmem.c b/drivers/gpu/drm/nouveau/nouveau_dmem.c
index cc9993837508..762e0168bc8d 100644
--- a/drivers/gpu/drm/nouveau/nouveau_dmem.c
+++ b/drive...
2020 Jul 13
0
[PATCH v2 2/5] mm/migrate: add a direction parameter to migrate_vma
...;
+ mig.dir = MIGRATE_VMA_FROM_SYSTEM;
/*
* We come here with mmap_lock write lock held just for
@@ -578,6 +579,7 @@ kvmppc_svm_page_out(struct vm_area_struct *vma, unsigned long start,
mig.src = &src_pfn;
mig.dst = &dst_pfn;
mig.src_owner = &kvmppc_uvmem_pgmap;
+ mig.dir = MIGRATE_VMA_FROM_DEVICE_PRIVATE;
mutex_lock(&kvm->arch.uvmem_lock);
/* The requested page is already paged-out, nothing to do */
diff --git a/drivers/gpu/drm/nouveau/nouveau_dmem.c b/drivers/gpu/drm/nouveau/nouveau_dmem.c
index e5c230d9ae24..e5c83b8ee82e 100644
--- a/drivers/gpu/drm/nouveau/nouveau_dmem.c
+++ b/drive...
2020 Jul 20
2
[PATCH v2 2/5] mm/migrate: add a direction parameter to migrate_vma
...gt;
> /*
> * We come here with mmap_lock write lock held just for
> @@ -578,6 +579,7 @@ kvmppc_svm_page_out(struct vm_area_struct *vma, unsigned long start,
> mig.src = &src_pfn;
> mig.dst = &dst_pfn;
> mig.src_owner = &kvmppc_uvmem_pgmap;
> + mig.dir = MIGRATE_VMA_FROM_DEVICE_PRIVATE;
>
> mutex_lock(&kvm->arch.uvmem_lock);
> /* The requested page is already paged-out, nothing to do */
> diff --git a/drivers/gpu/drm/nouveau/nouveau_dmem.c b/drivers/gpu/drm/nouveau/nouveau_dmem.c
> index e5c230d9ae24..e5c83b8ee82e 100644
> +++ b/drivers/gpu/drm/nouv...
2020 Jul 20
0
[PATCH v2 2/5] mm/migrate: add a direction parameter to migrate_vma
...* We come here with mmap_lock write lock held just for
>> @@ -578,6 +579,7 @@ kvmppc_svm_page_out(struct vm_area_struct *vma, unsigned long start,
>> mig.src = &src_pfn;
>> mig.dst = &dst_pfn;
>> mig.src_owner = &kvmppc_uvmem_pgmap;
>> + mig.dir = MIGRATE_VMA_FROM_DEVICE_PRIVATE;
>>
>> mutex_lock(&kvm->arch.uvmem_lock);
>> /* The requested page is already paged-out, nothing to do */
>> diff --git a/drivers/gpu/drm/nouveau/nouveau_dmem.c b/drivers/gpu/drm/nouveau/nouveau_dmem.c
>> index e5c230d9ae24..e5c83b8ee82e 100644
>>...
2020 Jul 13
9
[PATCH v2 0/5] mm/migrate: avoid device private invalidations
The goal for this series is to avoid device private memory TLB
invalidations when migrating a range of addresses from system
memory to device private memory and some of those pages have already
been migrated. The approach taken is to introduce a new mmu notifier
invalidation event type and use that in the device driver to skip
invalidation callbacks from migrate_vma_setup(). The device driver is
2020 Jul 06
8
[PATCH 0/5] mm/migrate: avoid device private invalidations
The goal for this series is to avoid device private memory TLB
invalidations when migrating a range of addresses from system
memory to device private memory and some of those pages have already
been migrated. The approach taken is to introduce a new mmu notifier
invalidation event type and use that in the device driver to skip
invalidation callbacks from migrate_vma_setup(). The device driver is
2020 Jul 20
2
[PATCH v2 2/5] mm/migrate: add a direction parameter to migrate_vma
....h
> > > @@ -180,6 +180,11 @@ static inline unsigned long migrate_pfn(unsigned long pfn)
> > > return (pfn << MIGRATE_PFN_SHIFT) | MIGRATE_PFN_VALID;
> > > }
> > > +enum migrate_vma_direction {
> > > + MIGRATE_VMA_FROM_SYSTEM,
> > > + MIGRATE_VMA_FROM_DEVICE_PRIVATE,
> > > +};
> >
> > I would have guessed this is more natural as _FROM_DEVICE_ and
> > TO_DEVICE_ ?
>
> The caller controls where the destination memory is allocated so it isn't
> necessarily device private memory, it could be from system to system.
> The...
2020 Jul 20
1
[PATCH v2 3/5] mm/notifier: add migration invalidation type
...er when
working with DEVICE_PRIVATE?
But then the comment in the prior patch should be fixed:
@@ -199,11 +204,12 @@ struct migrate_vma {
/*
* Set to the owner value also stored in page->pgmap->owner for
+ * migrating device private memory. The direction also needs to
+ * be set to MIGRATE_VMA_FROM_DEVICE_PRIVATE.
To say the caller must always provide src_owner.
And that field should probably be renamed at this point, as there is
nothing "src" about it. It is just the pgmap_owner of the
DEVICE_PRIVATE pages the TO/FROM DEVICE migration is working on.
Jason
2020 Jul 20
1
[PATCH v2 2/5] mm/migrate: add a direction parameter to migrate_vma
...unsigned long migrate_pfn(unsigned long pfn)
> > > > > return (pfn << MIGRATE_PFN_SHIFT) | MIGRATE_PFN_VALID;
> > > > > }
> > > > > +enum migrate_vma_direction {
> > > > > + MIGRATE_VMA_FROM_SYSTEM,
> > > > > + MIGRATE_VMA_FROM_DEVICE_PRIVATE,
> > > > > +};
> > > >
> > > > I would have guessed this is more natural as _FROM_DEVICE_ and
> > > > TO_DEVICE_ ?
> > >
> > > The caller controls where the destination memory is allocated so it isn't
> > > necessar...
2020 Jul 20
0
[PATCH v2 2/5] mm/migrate: add a direction parameter to migrate_vma
...;> @@ -180,6 +180,11 @@ static inline unsigned long migrate_pfn(unsigned long pfn)
>>>> return (pfn << MIGRATE_PFN_SHIFT) | MIGRATE_PFN_VALID;
>>>> }
>>>> +enum migrate_vma_direction {
>>>> + MIGRATE_VMA_FROM_SYSTEM,
>>>> + MIGRATE_VMA_FROM_DEVICE_PRIVATE,
>>>> +};
>>>
>>> I would have guessed this is more natural as _FROM_DEVICE_ and
>>> TO_DEVICE_ ?
>>
>> The caller controls where the destination memory is allocated so it isn't
>> necessarily device private memory, it could be from syste...
2020 Jul 20
0
[PATCH v2 2/5] mm/migrate: add a direction parameter to migrate_vma
...nsigned long migrate_pfn(unsigned long pfn)
>>>>>> return (pfn << MIGRATE_PFN_SHIFT) | MIGRATE_PFN_VALID;
>>>>>> }
>>>>>> +enum migrate_vma_direction {
>>>>>> + MIGRATE_VMA_FROM_SYSTEM,
>>>>>> + MIGRATE_VMA_FROM_DEVICE_PRIVATE,
>>>>>> +};
>>>>>
>>>>> I would have guessed this is more natural as _FROM_DEVICE_ and
>>>>> TO_DEVICE_ ?
>>>>
>>>> The caller controls where the destination memory is allocated so it isn't
>>>> n...