[Nouveau] [PATCH v3 2/5] mm/migrate: add a flags parameter to migrate_vma

2020-07-21 Thread Ralph Campbell
The src_owner field in struct migrate_vma is being used for two purposes, it acts as a selection filter for which types of pages are to be migrated and it identifies device private pages owned by the caller. Split this into separate parameters so the src_owner field can be used just to identify

[Nouveau] [PATCH v3 0/5] mm/migrate: avoid device private invalidations

2020-07-21 Thread Ralph Campbell
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

[Nouveau] [PATCH v3 4/5] nouveau/svm: use the new migration invalidation

2020-07-21 Thread Ralph Campbell
Use the new MMU_NOTIFY_MIGRATE event to skip GPU MMU invalidations of device private memory and handle the invalidation in the driver as part of migrating device private memory. Signed-off-by: Ralph Campbell --- drivers/gpu/drm/nouveau/nouveau_dmem.c | 15 ---

[Nouveau] [PATCH v3 1/5] nouveau: fix storing invalid ptes

2020-07-21 Thread Ralph Campbell
When migrating a range of system memory to device private memory, some of the pages in the address range may not be migrating. In this case, the non migrating pages won't have a new GPU MMU entry to store but the nvif_object_ioctl() NVIF_VMM_V0_PFNMAP method doesn't check the input and stores a

[Nouveau] [PATCH v3 3/5] mm/notifier: add migration invalidation type

2020-07-21 Thread Ralph Campbell
Currently migrate_vma_setup() calls mmu_notifier_invalidate_range_start() which flushes all device private page mappings whether or not a page is being migrated to/from device private memory. In order to not disrupt device mappings that are not being migrated, shift the responsibility for clearing

[Nouveau] [PATCH v3 5/5] mm/hmm/test: use the new migration invalidation

2020-07-21 Thread Ralph Campbell
Use the new MMU_NOTIFY_MIGRATE event to skip MMU invalidations of device private memory and handle the invalidation in the driver as part of migrating device private memory. Signed-off-by: Ralph Campbell --- lib/test_hmm.c | 30 +++---

Re: [Nouveau] nouveau regression with 5.7 caused by "PCI/PM: Assume ports without DLL Link Active train links in 100 ms"

2020-07-21 Thread Lyude Paul
On Tue, 2020-07-21 at 12:00 -0400, Lyude Paul wrote: > On Tue, 2020-07-21 at 18:27 +0300, Mika Westerberg wrote: > > On Tue, Jul 21, 2020 at 11:01:55AM -0400, Lyude Paul wrote: > > > Sure thing. Also, feel free to let me know if you'd like access to one > > > of > > > the > > > systems we saw

Re: [Nouveau] nouveau regression with 5.7 caused by "PCI/PM: Assume ports without DLL Link Active train links in 100 ms"

2020-07-21 Thread Lyude Paul
On Tue, 2020-07-21 at 18:27 +0300, Mika Westerberg wrote: > On Tue, Jul 21, 2020 at 11:01:55AM -0400, Lyude Paul wrote: > > Sure thing. Also, feel free to let me know if you'd like access to one of > > the > > systems we saw breaking with this patch - I'm fairly sure I've got one of > > them > >

Re: [Nouveau] [PATCH -next] drm/nouveau/kms/nvd9-: Fix file release memory leak

2020-07-21 Thread Lyude Paul
Reviewed-by: Lyude Paul Thanks! On Tue, 2020-07-21 at 15:17 +, Wei Yongjun wrote: > When using single_open() for opening, single_release() should be > used instead of seq_release(), otherwise there is a memory leak. > > Fixes: 12885ecbfe62 ("drm/nouveau/kms/nvd9-: Add CRC support") >

Re: [Nouveau] nouveau regression with 5.7 caused by "PCI/PM: Assume ports without DLL Link Active train links in 100 ms"

2020-07-21 Thread Mika Westerberg
On Tue, Jul 21, 2020 at 11:01:55AM -0400, Lyude Paul wrote: > Sure thing. Also, feel free to let me know if you'd like access to one of the > systems we saw breaking with this patch - I'm fairly sure I've got one of them > locally at my apartment and don't mind setting up AMT/KVM/SSH Probably no

Re: [Nouveau] nouveau regression with 5.7 caused by "PCI/PM: Assume ports without DLL Link Active train links in 100 ms"

2020-07-21 Thread Lyude Paul
Sure thing. Also, feel free to let me know if you'd like access to one of the systems we saw breaking with this patch - I'm fairly sure I've got one of them locally at my apartment and don't mind setting up AMT/KVM/SSH On Tue, 2020-07-21 at 15:22 +0300, Mika Westerberg wrote: > Hi, > > [Sorry

Re: [Nouveau] nouveau regression with 5.7 caused by "PCI/PM: Assume ports without DLL Link Active train links in 100 ms"

2020-07-21 Thread Mika Westerberg
On Fri, Jul 17, 2020 at 09:52:09PM +0200, Lukas Wunner wrote: > On Fri, Jul 17, 2020 at 03:04:10PM -0400, Lyude Paul wrote: > > Isn't it possible to tell whether a PCI device is connected through > > thunderbolt or not? We could probably get away with just defaulting > > to 100ms for thunderbolt

Re: [Nouveau] nouveau regression with 5.7 caused by "PCI/PM: Assume ports without DLL Link Active train links in 100 ms"

2020-07-21 Thread Mika Westerberg
Hi, [Sorry for the delay, I was on vacation] On Fri, Jul 17, 2020 at 01:32:10PM +0200, Karol Herbst wrote: > Filed at https://bugzilla.kernel.org/show_bug.cgi?id=208597 Thanks for reporting. I'll check your logs and try to figure if there is something we can do to make both nouveau and TBT