Re: [PATCH v6 8/8] nouveau/svm: Implement atomic SVM access

2021-03-22 Thread Alistair Popple
On Monday, 15 March 2021 6:51:13 PM AEDT Christoph Hellwig wrote: > > - /*XXX: atomic? */ > > - return (fa->access == 0 || fa->access == 3) - > > - (fb->access == 0 || fb->access == 3); > > + /* Atomic access (2) has highest priority */ > > + return (-1*(fa->access == 2) + (fa->acc

Re: [PATCH v6 8/8] nouveau/svm: Implement atomic SVM access

2021-03-15 Thread Christoph Hellwig
> - /*XXX: atomic? */ > - return (fa->access == 0 || fa->access == 3) - > -(fb->access == 0 || fb->access == 3); > + /* Atomic access (2) has highest priority */ > + return (-1*(fa->access == 2) + (fa->access == 0 || fa->access == 3)) - > +(-1*(fb->access ==

[PATCH v6 8/8] nouveau/svm: Implement atomic SVM access

2021-03-12 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 th