Re: [Question] Are "device exclusive non-swap entries" / "SVM atomics in Nouveau" still getting used in practice?

David Hildenbrand
2025-01-24T14:39:28Z

On 24.01.25 15:11, Jason Gunthorpe wrote:
> On Fri, Jan 24, 2025 at 11:44:28AM +0100, David Hildenbrand wrote:
>
>> There are other concerns I have (what if the page is pinned and access
>> outside of the user space page tables?). Maybe there was not need to handle
>> these cases so far.
>
> I think alot of this depends on userspace following some restrictions
> so that the pages are always convertible. Presumably if the userspace
> breaks things then their atomic using GPU kernels will fault.
>
> So, from a kernel perspective, I'd suggest that creating a reasonable
> set of conditions that userspace can follow to have it work reliably
> is a reasonable goal.

Yes, that's my assumption as well. If you register a page using io_uring
as a fixed buffer and then trigger "device_exclusive" access, the page
can still be read/written using io_uring and atomics might not work as
expected. "Not supported".

--
Cheers,

David / dhildenb