Re: [Nouveau] [PATCH v2] nouveau/hmm: map pages after migration

2020-03-04 Thread Christoph Hellwig
On Tue, Mar 03, 2020 at 01:15:21PM -0800, Ralph Campbell wrote: >>> +static inline struct nouveau_pfnmap_args * >>> +nouveau_pfns_to_args(void *pfns) >> >> don't use static inline inside C files > > OK. > >>> +{ >>> + struct nvif_vmm_pfnmap_v0 *p = >>> + container_of(pfns, struct nvif_v

Re: [Nouveau] [PATCH v2] nouveau/hmm: map pages after migration

2020-03-03 Thread Ralph Campbell
On 3/3/20 4:42 AM, Jason Gunthorpe wrote: On Mon, Mar 02, 2020 at 05:00:23PM -0800, Ralph Campbell wrote: When memory is migrated to the GPU, it is likely to be accessed by GPU code soon afterwards. Instead of waiting for a GPU fault, map the migrated memory into the GPU page tables with the sa

Re: [Nouveau] [PATCH v2] nouveau/hmm: map pages after migration

2020-03-03 Thread Jason Gunthorpe
On Mon, Mar 02, 2020 at 05:00:23PM -0800, Ralph Campbell wrote: > When memory is migrated to the GPU, it is likely to be accessed by GPU > code soon afterwards. Instead of waiting for a GPU fault, map the > migrated memory into the GPU page tables with the same access permissions > as the source CP

[Nouveau] [PATCH v2] nouveau/hmm: map pages after migration

2020-03-02 Thread Ralph Campbell
When memory is migrated to the GPU, it is likely to be accessed by GPU code soon afterwards. Instead of waiting for a GPU fault, map the migrated memory into the GPU page tables with the same access permissions as the source CPU page table entries. This preserves copy on write semantics. Signed-of