Re: [Nouveau] 5.12.1 0010:nvkm_falcon_v1_wait_for_halt+0x8f/0xb9 [nouveau]

2021-05-24 Thread Ben Skeggs
On Fri, 7 May 2021 at 00:50, Bjorn Helgaas wrote: > > [+cc Ben] > > Hi Marc, > > Thanks for paying attention to these things. I added Ben (who > probably would see this via nouveau@lists.freedesktop.org anyway). > I don't see a PCI issue here, but the nouveau timeout, which I know > nothing

Re: [Nouveau] [PATCH v9 07/10] mm: Device exclusive memory access

2021-05-24 Thread John Hubbard
On 5/24/21 3:11 PM, Andrew Morton wrote: ... Documentation/vm/hmm.rst | 17 include/linux/mmu_notifier.h | 6 ++ include/linux/rmap.h | 4 + include/linux/swap.h | 7 +- include/linux/swapops.h | 44 - mm/hmm.c | 5 +

Re: [Nouveau] [PATCH v9 07/10] mm: Device exclusive memory access

2021-05-24 Thread Andrew Morton
On Mon, 24 May 2021 23:27:22 +1000 Alistair Popple wrote: > Some devices require exclusive write access to shared virtual > memory (SVM) ranges to perform atomic operations on that memory. This > requires CPU page tables to be updated to deny access whilst atomic > operations are occurring. > >

[Nouveau] [PATCH v9 10/10] nouveau/svm: Implement atomic SVM access

2021-05-24 Thread Alistair Popple
Some NVIDIA GPUs do not support direct atomic access to system memory via PCIe. Instead this must be emulated by granting the GPU exclusive access to the memory. This is achieved by replacing CPU page table entries with special swap entries that fault on userspace access. The driver then grants

[Nouveau] [PATCH v9 09/10] nouveau/svm: Refactor nouveau_range_fault

2021-05-24 Thread Alistair Popple
Call mmu_interval_notifier_insert() as part of nouveau_range_fault(). This doesn't introduce any functional change but makes it easier for a subsequent patch to alter the behaviour of nouveau_range_fault() to support GPU atomic operations. Signed-off-by: Alistair Popple Reviewed-by: Ben Skeggs

[Nouveau] [PATCH v9 07/10] mm: Device exclusive memory access

2021-05-24 Thread Alistair Popple
Some devices require exclusive write access to shared virtual memory (SVM) ranges to perform atomic operations on that memory. This requires CPU page tables to be updated to deny access whilst atomic operations are occurring. In order to do this introduce a new swap entry type

[Nouveau] [PATCH v9 08/10] mm: Selftests for exclusive device memory

2021-05-24 Thread Alistair Popple
Adds some selftests for exclusive device memory. Signed-off-by: Alistair Popple Acked-by: Jason Gunthorpe Tested-by: Ralph Campbell Reviewed-by: Ralph Campbell --- lib/test_hmm.c | 124 +++ lib/test_hmm_uapi.h| 2 +

[Nouveau] [PATCH v9 04/10] mm/rmap: Split migration into its own function

2021-05-24 Thread Alistair Popple
Migration is currently implemented as a mode of operation for try_to_unmap_one() generally specified by passing the TTU_MIGRATION flag or in the case of splitting a huge anonymous page TTU_SPLIT_FREEZE. However it does not have much in common with the rest of the unmap functionality of

[Nouveau] [PATCH v9 06/10] mm/memory.c: Allow different return codes for copy_nonpresent_pte()

2021-05-24 Thread Alistair Popple
Currently if copy_nonpresent_pte() returns a non-zero value it is assumed to be a swap entry which requires further processing outside the loop in copy_pte_range() after dropping locks. This prevents other values being returned to signal conditions such as failure which a subsequent change

[Nouveau] [PATCH v9 05/10] mm: Rename migrate_pgmap_owner

2021-05-24 Thread Alistair Popple
MMU notifier ranges have a migrate_pgmap_owner field which is used by drivers to store a pointer. This is subsequently used by the driver callback to filter MMU_NOTIFY_MIGRATE events. Other notifier event types can also benefit from this filtering, so rename the 'migrate_pgmap_owner' field to

[Nouveau] [PATCH v9 03/10] mm/rmap: Split try_to_munlock from try_to_unmap

2021-05-24 Thread Alistair Popple
The behaviour of try_to_unmap_one() is difficult to follow because it performs different operations based on a fairly large set of flags used in different combinations. TTU_MUNLOCK is one such flag. However it is exclusively used by try_to_munlock() which specifies no other flags. Therefore

[Nouveau] [PATCH v9 02/10] mm/swapops: Rework swap entry manipulation code

2021-05-24 Thread Alistair Popple
Both migration and device private pages use special swap entries that are manipluated by a range of inline functions. The arguments to these are somewhat inconsitent so rework them to remove flag type arguments and to make the arguments similar for both read and write entry creation.

[Nouveau] [PATCH v9 01/10] mm: Remove special swap entry functions

2021-05-24 Thread Alistair Popple
Remove multiple similar inline functions for dealing with different types of special swap entries. Both migration and device private swap entries use the swap offset to store a pfn. Instead of multiple inline functions to obtain a struct page for each swap entry type use a common function

[Nouveau] [PATCH v9 00/10] Add support for SVM atomics in Nouveau

2021-05-24 Thread Alistair Popple
This is a repost of the previous series to rebase on v5.13-rc2 and to address comments. Outside of some code comment updates the primary change was to split the renaming of migrate_pgmap_owner into a separate patch and to further simplify the handling of device exclusive entries in

Re: [Nouveau] [Intel-gfx] [PATCH 0/7] Per client engine busyness

2021-05-24 Thread Tvrtko Ursulin
On 20/05/2021 09:35, Tvrtko Ursulin wrote: On 19/05/2021 19:23, Daniel Vetter wrote: On Wed, May 19, 2021 at 6:16 PM Tvrtko Ursulin wrote: On 18/05/2021 10:40, Tvrtko Ursulin wrote: On 18/05/2021 10:16, Daniel Stone wrote: Hi, On Tue, 18 May 2021 at 10:09, Tvrtko Ursulin wrote: I was