Re: [Nouveau] [PATCH v6 5/6] nouveau: use new mmu interval notifiers

2020-02-19 Thread Ralph Campbell
On 1/16/20 12:21 PM, Jason Gunthorpe wrote: On Thu, Jan 16, 2020 at 12:16:30PM -0800, Ralph Campbell wrote: Can you point me to the latest ODP code? Seems like my understanding is quite off. https://elixir.bootlin.com/linux/v5.5-rc6/source/drivers/infiniband/hw/mlx5/odp.c Look for the word

Re: [Nouveau] [PATCH v6 5/6] nouveau: use new mmu interval notifiers

2020-01-16 Thread Jason Gunthorpe
On Thu, Jan 16, 2020 at 12:16:30PM -0800, Ralph Campbell wrote: > Can you point me to the latest ODP code? Seems like my understanding is > quite off. https://elixir.bootlin.com/linux/v5.5-rc6/source/drivers/infiniband/hw/mlx5/odp.c Look for the word 'implicit' mlx5_ib_invalidate_range()

Re: [Nouveau] [PATCH v6 5/6] nouveau: use new mmu interval notifiers

2020-01-16 Thread Ralph Campbell
On 1/16/20 8:00 AM, Jason Gunthorpe wrote: On Wed, Jan 15, 2020 at 02:09:47PM -0800, Ralph Campbell wrote: I don't understand the lifetime/membership issue. The driver is the only thing that allocates, inserts, or removes struct mmu_interval_notifier and thus completely controls the

Re: [Nouveau] [PATCH v6 5/6] nouveau: use new mmu interval notifiers

2020-01-16 Thread Jason Gunthorpe
On Wed, Jan 15, 2020 at 02:09:47PM -0800, Ralph Campbell wrote: > I don't understand the lifetime/membership issue. The driver is the only thing > that allocates, inserts, or removes struct mmu_interval_notifier and thus > completely controls the lifetime. If the returned value is on the defered

Re: [Nouveau] [PATCH v6 5/6] nouveau: use new mmu interval notifiers

2020-01-15 Thread Ralph Campbell
On 1/14/20 5:00 AM, Jason Gunthorpe wrote: On Mon, Jan 13, 2020 at 02:47:02PM -0800, Ralph Campbell wrote: void nouveau_svmm_fini(struct nouveau_svmm **psvmm) { struct nouveau_svmm *svmm = *psvmm; + struct mmu_interval_notifier *mni; + if (svmm) {

Re: [Nouveau] [PATCH v6 5/6] nouveau: use new mmu interval notifiers

2020-01-14 Thread Jason Gunthorpe
On Mon, Jan 13, 2020 at 02:47:02PM -0800, Ralph Campbell wrote: > void > nouveau_svmm_fini(struct nouveau_svmm **psvmm) > { > struct nouveau_svmm *svmm = *psvmm; > + struct mmu_interval_notifier *mni; > + > if (svmm) { > mutex_lock(>mutex); > + while

[Nouveau] [PATCH v6 5/6] nouveau: use new mmu interval notifiers

2020-01-13 Thread Ralph Campbell
Update nouveau to only use the mmu interval notifiers. Signed-off-by: Ralph Campbell --- drivers/gpu/drm/nouveau/nouveau_svm.c | 313 +- 1 file changed, 201 insertions(+), 112 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_svm.c