Displaying 20 results from an estimated 25 matches for "sync_cpu_device_paget".
2019 Jul 23
4
[PATCH] mm/hmm: replace hmm_update with mmu_notifier_range
The hmm_mirror_ops callback function sync_cpu_device_pagetables() passes
a struct hmm_update which is a simplified version of struct
mmu_notifier_range. This is unnecessary so replace hmm_update with
mmu_notifier_range directly.
Signed-off-by: Ralph Campbell <rcampbell at nvidia.com>
Cc: "Jérôme Glisse" <jglisse at redhat.com>
Cc: Ja...
2019 Jul 25
0
[PATCH] mm/hmm: replace hmm_update with mmu_notifier_range
On Tue, Jul 23, 2019 at 02:05:06PM -0700, Ralph Campbell wrote:
> The hmm_mirror_ops callback function sync_cpu_device_pagetables() passes
> a struct hmm_update which is a simplified version of struct
> mmu_notifier_range. This is unnecessary so replace hmm_update with
> mmu_notifier_range directly.
>
> Signed-off-by: Ralph Campbell <rcampbell at nvidia.com>
> Cc: "Jérôme Glisse" <jg...
2019 Jul 24
5
[PATCH] mm/hmm: replace hmm_update with mmu_notifier_range
...0, Christoph Hellwig wrote:
> Looks good:
>
> Reviewed-by: Christoph Hellwig <hch at lst.de>
>
> One comment on a related cleanup:
>
> > list_for_each_entry(mirror, &hmm->mirrors, list) {
> > int rc;
> >
> > - rc = mirror->ops->sync_cpu_device_pagetables(mirror, &update);
> > + rc = mirror->ops->sync_cpu_device_pagetables(mirror, nrange);
> > if (rc) {
> > - if (WARN_ON(update.blockable || rc != -EAGAIN))
> > + if (WARN_ON(mmu_notifier_range_blockable(nrange) ||
> > + rc != -EAGAIN))
> &...
2019 Nov 12
0
[PATCH v3 13/14] mm/hmm: remove hmm_mirror and related
...s is called when the mm_struct is being released. The callback
- * must ensure that all access to any pages obtained from this mirror
- * is halted before the callback returns. All future access should
- * fault.
- */
- void (*release)(struct hmm_mirror *mirror);
-
- /* sync_cpu_device_pagetables() - synchronize page tables
- *
- * @mirror: pointer to struct hmm_mirror
- * @update: update information (see struct mmu_notifier_range)
- * Return: -EAGAIN if update.blockable false and callback need to
- * block, 0 otherwise.
- *
- * This callback...
2019 Jul 24
0
[PATCH] mm/hmm: replace hmm_update with mmu_notifier_range
Looks good:
Reviewed-by: Christoph Hellwig <hch at lst.de>
One comment on a related cleanup:
> list_for_each_entry(mirror, &hmm->mirrors, list) {
> int rc;
>
> - rc = mirror->ops->sync_cpu_device_pagetables(mirror, &update);
> + rc = mirror->ops->sync_cpu_device_pagetables(mirror, nrange);
> if (rc) {
> - if (WARN_ON(update.blockable || rc != -EAGAIN))
> + if (WARN_ON(mmu_notifier_range_blockable(nrange) ||
> + rc != -EAGAIN))
> continue;
> re...
2019 Jul 24
0
[PATCH] mm/hmm: replace hmm_update with mmu_notifier_range
...> >
> > Reviewed-by: Christoph Hellwig <hch at lst.de>
> >
> > One comment on a related cleanup:
> >
> > > list_for_each_entry(mirror, &hmm->mirrors, list) {
> > > int rc;
> > >
> > > - rc = mirror->ops->sync_cpu_device_pagetables(mirror, &update);
> > > + rc = mirror->ops->sync_cpu_device_pagetables(mirror, nrange);
> > > if (rc) {
> > > - if (WARN_ON(update.blockable || rc != -EAGAIN))
> > > + if (WARN_ON(mmu_notifier_range_blockable(nrange) ||
> > > +...
2019 Oct 29
0
[PATCH v2 13/15] drm/amdgpu: Use mmu_range_insert instead of hmm_mirror
...+ down_read(&amn->lock);
> + up_read(&amn->lock);
> return 0;
> }
>
> @@ -295,12 +164,10 @@ amdgpu_mn_sync_pagetables_hsa(struct hmm_mirror *mirror,
>
> static struct hmm_mirror_ops amdgpu_hmm_mirror_ops[] = {
> [AMDGPU_MN_TYPE_GFX] = {
> - .sync_cpu_device_pagetables = amdgpu_mn_sync_pagetables_gfx,
> - .release = amdgpu_hmm_mirror_release
> + .sync_cpu_device_pagetables = amdgpu_mn_sync_pagetables,
> },
> [AMDGPU_MN_TYPE_HSA] = {
> - .sync_cpu_device_pagetables = amdgpu_mn_sync_pagetables_hsa,
> - .release = amdgpu_hmm_mirror_r...
2019 Oct 29
0
[PATCH v2 13/15] drm/amdgpu: Use mmu_range_insert instead of hmm_mirror
...+ down_read(&amn->lock);
> + up_read(&amn->lock);
> return 0;
> }
>
> @@ -295,12 +164,10 @@ amdgpu_mn_sync_pagetables_hsa(struct hmm_mirror *mirror,
>
> static struct hmm_mirror_ops amdgpu_hmm_mirror_ops[] = {
> [AMDGPU_MN_TYPE_GFX] = {
> - .sync_cpu_device_pagetables = amdgpu_mn_sync_pagetables_gfx,
> - .release = amdgpu_hmm_mirror_release
> + .sync_cpu_device_pagetables = amdgpu_mn_sync_pagetables,
> },
> [AMDGPU_MN_TYPE_HSA] = {
> - .sync_cpu_device_pagetables = amdgpu_mn_sync_pagetables_hsa,
> - .release = amdgpu_hmm_mirror_r...
2019 Oct 28
2
[PATCH v2 13/15] drm/amdgpu: Use mmu_range_insert instead of hmm_mirror
...tifier_range_blockable(update))
+ return false;
+ down_read(&amn->lock);
+ up_read(&amn->lock);
return 0;
}
@@ -295,12 +164,10 @@ amdgpu_mn_sync_pagetables_hsa(struct hmm_mirror *mirror,
static struct hmm_mirror_ops amdgpu_hmm_mirror_ops[] = {
[AMDGPU_MN_TYPE_GFX] = {
- .sync_cpu_device_pagetables = amdgpu_mn_sync_pagetables_gfx,
- .release = amdgpu_hmm_mirror_release
+ .sync_cpu_device_pagetables = amdgpu_mn_sync_pagetables,
},
[AMDGPU_MN_TYPE_HSA] = {
- .sync_cpu_device_pagetables = amdgpu_mn_sync_pagetables_hsa,
- .release = amdgpu_hmm_mirror_release
+ .sync_cpu_device_paget...
2019 Jul 24
2
[PATCH] mm/hmm: replace hmm_update with mmu_notifier_range
...hristoph Hellwig <hch at lst.de>
> > >
> > > One comment on a related cleanup:
> > >
> > > > list_for_each_entry(mirror, &hmm->mirrors, list) {
> > > > int rc;
> > > >
> > > > - rc = mirror->ops->sync_cpu_device_pagetables(mirror, &update);
> > > > + rc = mirror->ops->sync_cpu_device_pagetables(mirror, nrange);
> > > > if (rc) {
> > > > - if (WARN_ON(update.blockable || rc != -EAGAIN))
> > > > + if (WARN_ON(mmu_notifier_range_blockable(nrange) ||...
2019 Jul 30
0
[PATCH 05/13] mm: remove the unused vma argument to hmm_range_dma_unmap
...being unmapped
- * @vma: the vma against which the range (optional)
* @device: device against which dma map was done
* @daddrs: dma address of mapped pages
* @dirty: dirty page if it had the write flag set
@@ -1133,7 +1132,6 @@ EXPORT_SYMBOL(hmm_range_dma_map);
* concurrent mmu notifier or sync_cpu_device_pagetables() to make progress.
*/
long hmm_range_dma_unmap(struct hmm_range *range,
- struct vm_area_struct *vma,
struct device *device,
dma_addr_t *daddrs,
bool dirty)
--
2.20.1
2019 Jul 01
30
dev_pagemap related cleanups v4
Hi Dan, Jérôme and Jason,
below is a series that cleans up the dev_pagemap interface so that
it is more easily usable, which removes the need to wrap it in hmm
and thus allowing to kill a lot of code
Note: this series is on top of Linux 5.2-rc6 and has some minor
conflicts with the hmm tree that are easy to resolve.
Diffstat summary:
34 files changed, 379 insertions(+), 1016 deletions(-)
Git
2019 Jul 26
13
[PATCH v2 0/7] mm/hmm: more HMM clean up
Here are seven more patches for things I found to clean up.
This was based on top of Christoph's seven patches:
"hmm_range_fault related fixes and legacy API removal v3".
I assume this will go into Jason's tree since there will likely be
more HMM changes in this cycle.
Changes from v1 to v2:
Added AMD GPU to hmm_update removal.
Added 2 patches from Christoph.
Added 2 patches as
2019 Oct 29
0
[PATCH v2 14/15] drm/amdgpu: Use mmu_range_notifier instead of hmm_mirror
...truct
> - * alignment. Use these bits to make a unique key from the mm pointer
> - * and notifier type.
> - */
> -#define AMDGPU_MN_KEY(mm, type) ((unsigned long)(mm) + (type))
> -
> -static struct hmm_mirror_ops amdgpu_hmm_mirror_ops[] = {
> - [AMDGPU_MN_TYPE_GFX] = {
> - .sync_cpu_device_pagetables = amdgpu_mn_sync_pagetables,
> - },
> - [AMDGPU_MN_TYPE_HSA] = {
> - .sync_cpu_device_pagetables = amdgpu_mn_sync_pagetables,
> - },
> -};
> -
> -/**
> - * amdgpu_mn_get - create HMM mirror context
> - *
> - * @adev: amdgpu device pointer
> - * @type: type of...
2019 Oct 28
1
[PATCH v2 14/15] drm/amdgpu: Use mmu_range_notifier instead of hmm_mirror
...nable mm pointer will be unused due to struct
- * alignment. Use these bits to make a unique key from the mm pointer
- * and notifier type.
- */
-#define AMDGPU_MN_KEY(mm, type) ((unsigned long)(mm) + (type))
-
-static struct hmm_mirror_ops amdgpu_hmm_mirror_ops[] = {
- [AMDGPU_MN_TYPE_GFX] = {
- .sync_cpu_device_pagetables = amdgpu_mn_sync_pagetables,
- },
- [AMDGPU_MN_TYPE_HSA] = {
- .sync_cpu_device_pagetables = amdgpu_mn_sync_pagetables,
- },
-};
-
-/**
- * amdgpu_mn_get - create HMM mirror context
- *
- * @adev: amdgpu device pointer
- * @type: type of MMU notifier context
- *
- * Creates a HMM mirror conte...
2019 Nov 12
0
[PATCH v3 12/14] drm/amdgpu: Use mmu_interval_notifier instead of hmm_mirror
...nable mm pointer will be unused due to struct
- * alignment. Use these bits to make a unique key from the mm pointer
- * and notifier type.
- */
-#define AMDGPU_MN_KEY(mm, type) ((unsigned long)(mm) + (type))
-
-static struct hmm_mirror_ops amdgpu_hmm_mirror_ops[] = {
- [AMDGPU_MN_TYPE_GFX] = {
- .sync_cpu_device_pagetables = amdgpu_mn_sync_pagetables,
- },
- [AMDGPU_MN_TYPE_HSA] = {
- .sync_cpu_device_pagetables = amdgpu_mn_sync_pagetables,
- },
-};
-
-/**
- * amdgpu_mn_get - create HMM mirror context
- *
- * @adev: amdgpu device pointer
- * @type: type of MMU notifier context
- *
- * Creates a HMM mirror conte...
2019 Nov 12
20
[PATCH hmm v3 00/14] Consolidate the mmu notifier interval_tree and locking
From: Jason Gunthorpe <jgg at mellanox.com>
8 of the mmu_notifier using drivers (i915_gem, radeon_mn, umem_odp, hfi1,
scif_dma, vhost, gntdev, hmm) drivers are using a common pattern where
they only use invalidate_range_start/end and immediately check the
invalidating range against some driver data structure to tell if the
driver is interested. Half of them use an interval_tree, the others
2019 Oct 28
32
[PATCH v2 00/15] Consolidate the mmu notifier interval_tree and locking
From: Jason Gunthorpe <jgg at mellanox.com>
8 of the mmu_notifier using drivers (i915_gem, radeon_mn, umem_odp, hfi1,
scif_dma, vhost, gntdev, hmm) drivers are using a common pattern where
they only use invalidate_range_start/end and immediately check the
invalidating range against some driver data structure to tell if the
driver is interested. Half of them use an interval_tree, the others
2019 Oct 15
0
[PATCH hmm 10/15] nouveau: use mmu_notifier directly for invalidate_range_start
...veau_vmm *vmm;
struct {
unsigned long start;
@@ -96,7 +97,6 @@ struct nouveau_svmm {
struct mutex mutex;
- struct mm_struct *mm;
struct hmm_mirror mirror;
};
@@ -251,10 +251,11 @@ nouveau_svmm_invalidate(struct nouveau_svmm *svmm, u64 start, u64 limit)
}
static int
-nouveau_svmm_sync_cpu_device_pagetables(struct hmm_mirror *mirror,
- const struct mmu_notifier_range *update)
+nouveau_svmm_invalidate_range_start(struct mmu_notifier *mn,
+ const struct mmu_notifier_range *update)
{
- struct nouveau_svmm *svmm = container_of(mirror, typeof(*svmm), mirror);
+ struct nouveau_svmm *svmm =...
2019 Oct 29
4
[PATCH v2 14/15] drm/amdgpu: Use mmu_range_notifier instead of hmm_mirror
On Tue, Oct 29, 2019 at 07:22:37PM +0000, Yang, Philip wrote:
> Hi Jason,
>
> I did quick test after merging amd-staging-drm-next with the
> mmu_notifier branch, which includes this set changes. The test result
> has different failures, app stuck intermittently, GUI no display etc. I
> am understanding the changes and will try to figure out the cause.
Thanks! I'm not